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 27, 2018 in Chef by ajs3033
• 7,300 points
924 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 27, 2018 by shubham
• 7,340 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
• 18,570 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,300 points
509 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,980 points
847 views
0 votes
1 answer

How do I install chef on Ubuntu?

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

answered Feb 26, 2019 in Chef by Kalgi
• 52,360 points
532 views
0 votes
1 answer

Chef server on windows - Is that possible?

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

answered Feb 28, 2019 in Chef by Lina
418 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
• 52,360 points
1,311 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,460 views
+2 votes
1 answer
0 votes
1 answer

Long running chef-client executions

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

answered Jun 21, 2018 in Chef by shubham
• 7,340 points
512 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP