
run-list
A run-list defines all of the information necessary for Chef to configure a node into the desired state. A run-list may include roles and/or recipes.
A run-list must be in one of the following formats: fully qualified, cookbook, or default. Both roles and recipes must be in quotes, for example:
[code]’role[NAME]’
‘recipe[COOKBOOK::RECIPE]’
‘recipe[COOKBOOK::RECIPE],COOKBOOK::RECIPE,role[NAME]'[/code]
env_run_list
When you specify the env_run_list in role and the chef-client will pick up the _default run-list if env_run_list[environment_name] is null or nonexistent. env_run_list is only for roles.The env run list is an override, so it totally replaces the default non-env run list if the env matches.
[code]{
“name”: “webserver”,
“default_attributes”: {
},
“json_class”: “Chef::Role”,
“env_run_lists”: {
“production”: [],
“preprod”: [],
“test”: [ “role[base]”, “recipe[apache]” “recipe[apache::copy_test_configs]” ],
“dev”: [ “role[base]”, “recipe[apache]”, “recipe[apache::copy_dev_configs]” ]
},
“run_list”: [ “role[base]”, “recipe[apache]” ],
“description”: “The webserver role”,
“chef_type”: “role”,
“override_attributes”: {
}
}[/code]
where:
- “webserver” is the name of the role
- “env_run_lists” is a hash of per-environment run-lists for production, preprod, test, and dev
- “production” and “preprod” use the default run-list because they do not have a per-environment run-list
- “run_list” defines the default run-list
Reference
https://docs.chef.io/run_lists.html
https://railsware.com/blog/2013/09/26/getting-started-with-chef-server-part-2/
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services — all in one place.
Explore Hospitals