file { '/tmp/something/relevant': content => "yes\n" }
exec { 'my_command << /tmp/something/relevant': require =>
File['/tmp/something/relevant'] }
This *should* work, but I haven't tested it.
Trevor
On Wed, Feb 27, 2013 at 2:23 PM, Corey Osman <[email protected]> wrote:
> A friend of mine ask me this question and I stated puppet was only good
> for sending commands and not interacting with the command line. I told him
> to look for answer file support or a quite mode.
> However, I suppose he could also run a expect script that could answer the
> installer questions but this would be kinda complex for a beginner and not
> the right approach in my opinion.
>
> Is there a puppet resource or function that could automate this solution?
> Does puppet provide any expect like behavior?
>
> Question:
>
> I want to run and installer through an exec resource in Puppet. The
> problem is that the installer prompts you for a yes or no to choose the
> default path:
>
> Default directory for installation of products - /opt/ibm/db2/V10.1
>
> ***********************************************************
> Install into default directory (/opt/ibm/db2/V10.1) ? [yes/no]
>
> If I run this command through puppet, puppet never sends a yes and the
> prompt ends up in a loop and never runs the installer. You know how to make
> the exec resource send "yes" to the command line?
>
>
> Thanks,
>
> Corey Osman
> [email protected]
>
> Green IT and Data Center Automation Specialist
>
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
[email protected]
-- This account not approved for unencrypted proprietary information --
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.