On Thursday, February 7, 2013 5:12:41 AM UTC-6, Gavin Williams wrote: > > Morning all > > I'm looking at writing a set of types/providers to handle NetApp SnapDrive > configuration and usage... > > There's quite a lot to SnapDrive, so initially, I'm just trying to get it > to manage credentials. > > The challenge I can immediately see is that for me to set a credential, > the command prompts for a password input twice... Example command run is: > # snapdrive config set sd-act-star-db05 act-star-nactl01 > Password for sd-act-star-db05: > Retype password: > 0000-957 Warning: Optionally, Please set -mgmtpath interface for > act-star-nactl01 to be used as data interface i.e > snapdrive config set -mgmtpath <mgmtpath> act-star-nactl01 > > Is it possible to cater for this in a provider? > >
In principle, you can redirect appropriate canned responses into the command's standard input. I don't recall offhand whether Puppet's built-in executor facilities support that directly, but you can always wrap up something like that in a 'bash -c' command. It would be far better, however, if the configuration program were built to be scriptable (i.e. to not require interactive I/O). For one thing, does your installer prompt for a password even when it is run by root (which is what the agent will do in the usual configuration)? Does it support command-line options by which you can bypass any other Q&A? John -- 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.
