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,240 points
57 views

2 answers to this question.

+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,870 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,240 points
22 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,490 points
35 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
• 37,320 points
46 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
14 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
• 37,320 points
235 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,870 points
29 views