How can I add run list automatically when a Chef Server is created?

+5 votes

How can we automate the addition of run-list to a server when they are created.

Mar 26, 2018 in Chef by ajs3033
• 7,000 points
44 views

2 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
+2 votes
Best answer

You can create a repo in Git and connect it to the Jenkins build which adds the server to its own specific run list. You also have to maintain Repo specific to the application.

answered Mar 26, 2018 by shubham
• 6,480 points

selected Oct 12, 2018 by Omkar
+1 vote

Try adding a role to your Chef Server and put the node in the role. You can specify some role default attributes, such as chef_client interval/splay that control how often the chef-client runs on the node. Here's an example role file:

{
   "name": "web",
   "description": "Web server role.",
   "json_class": "Chef::Role",
   "default_attributes": {
     "chef_client": {
       "interval": 300,
       "splay": 60
     }
   },
   "override_attributes": {
   },
   "chef_type": "role",
   "run_list": ["recipe[chef-client::default]",
                "recipe[chef-client::delete_validation]"
   ],
   "env_run_lists": {
   }
}
answered Oct 12, 2018 by Hannah
• 14,080 points

Related Questions In Chef

0 votes
1 answer

How do I run chef client?

You've kinda answered your own question there. ...READ MORE

answered Jun 14, 2018 in Chef by ajs3033
• 7,000 points
17 views
0 votes
1 answer

How do I Force push a recipe to the end of run_list Iin Chef?

Here is a concept which you can ...READ MORE

answered Aug 7, 2018 in Chef by Damon Salvatore
• 5,250 points
25 views
0 votes
1 answer

How do I install chef on Ubuntu?

Hey @Yamini, follow these steps to install ...READ MORE

answered Feb 26 in Chef by Kalgi
• 35,720 points
36 views
0 votes
1 answer

Chef server on windows - Is that possible?

You cannot set a chef server on ...READ MORE

answered Feb 27 in Chef by Lina
11 views
+1 vote
2 answers

Unable To Create a Chef Node "ChefNode2"

Try giving the password to access your ...READ MORE

answered Oct 16, 2018 in Chef by Kalgi
• 35,720 points
192 views
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

Long running chef-client executions

You can try the following steps. Chef Server ...READ MORE

answered Jun 20, 2018 in Chef by shubham
• 6,480 points
26 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.