Prompt-chef


#1

Hi,

How to prompt in chef?
I need to ask from a user whether they need to keep the default value which i described in attribute file or they need to override with their new value and get and process in that value itself.

Thanks,
Indra K


#2

Chef is designed to be headless - you would store the password on the system or in an environment variable.

See also: http://stackoverflow.com/questions/19754127/chef-solo-get-user-input

Thanks,
Seth

On Aug 6, 2014, at 2:17 AM, Indra k indra.k@cloudenablers.com wrote:

Hi,

How to prompt in chef?
I need to ask from a user whether they need to keep the default value which i described in attribute file or they need to override with their new value and get and process in that value itself.

Thanks,
Indra K


#3

What Seth said is true - this is probably not a good idea. That said, we
are just Ruby - so go nuts prompting users if you so desire. :slight_smile:
On Aug 6, 2014 8:10 AM, “Seth Vargo” sethvargo@getchef.com wrote:

Chef is designed to be headless - you would store the password on the
system or in an environment variable.

See also:
http://stackoverflow.com/questions/19754127/chef-solo-get-user-input

Thanks,
Seth

On Aug 6, 2014, at 2:17 AM, Indra k indra.k@cloudenablers.com wrote:

Hi,

How to prompt in chef?
I need to ask from a user whether they need to keep the default value
which i described in attribute file or they need to override with their new
value and get and process in that value itself.

Thanks,
Indra K