When you say “user” are you talking about somebody sitting at the client computer, or are you talking about the administrator who manages the cookbooks etc. on the chef server? On the chef server, there are several ways to do what you want: you can override the attribute using roles, or put it in a data bag, or set the attributes using knife. If you want a user on the client machine to do this – chef is probably not the right tool for you. The whole point of chef is that it runs unattended (and many people run it automatically every 30 minutes, so even if you *could* prompt a user, that would happen twice every hour). You could probably rig something using a “flag” file – the user creates a particular file in a particular location, and then your chef recipe checks if that file exists, and adjusts the attributes as needed. A better option is probably for the user to talk to an administrator, and update the attributes on the chef server. From: Indra k [mailto:
Hi, How to prompt in chef attributes ? 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. I used get.chomp in ruby_block Thanks, Indra K |
Archive powered by MHonArc 2.6.16.