{"id":4942,"date":"2018-05-03T06:31:23","date_gmt":"2018-05-03T06:31:23","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=4942"},"modified":"2021-02-27T09:07:03","modified_gmt":"2021-02-27T09:07:03","slug":"run_list-and-env_run_list-explanined-in-chef-role","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/run_list-and-env_run_list-explanined-in-chef-role\/","title":{"rendered":"run_list and env_run_list explanined in chef role"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5023\" src=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/05\/chef.png\" alt=\"\" width=\"600\" height=\"350\" srcset=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/05\/chef.png 600w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/05\/chef-300x175.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p><strong>run-list<\/strong><br \/>\nA 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.<\/p>\n<p>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:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">'role&#x5B;NAME]'\r\n'recipe&#x5B;COOKBOOK::RECIPE]'\r\n'recipe&#x5B;COOKBOOK::RECIPE],COOKBOOK::RECIPE,role&#x5B;NAME]'<\/pre>\n<p><strong>env_run_list<\/strong><br \/>\nWhen 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.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">{\r\n &quot;name&quot;: &quot;webserver&quot;,\r\n &quot;default_attributes&quot;: {\r\n },\r\n &quot;json_class&quot;: &quot;Chef::Role&quot;,\r\n &quot;env_run_lists&quot;: {\r\n &quot;production&quot;: &#x5B;],\r\n &quot;preprod&quot;: &#x5B;],\r\n &quot;test&quot;: &#x5B; &quot;role&#x5B;base]&quot;, &quot;recipe&#x5B;apache]&quot; &quot;recipe&#x5B;apache::copy_test_configs]&quot; ],\r\n &quot;dev&quot;: &#x5B; &quot;role&#x5B;base]&quot;, &quot;recipe&#x5B;apache]&quot;, &quot;recipe&#x5B;apache::copy_dev_configs]&quot; ]\r\n },\r\n &quot;run_list&quot;: &#x5B; &quot;role&#x5B;base]&quot;, &quot;recipe&#x5B;apache]&quot; ],\r\n &quot;description&quot;: &quot;The webserver role&quot;,\r\n &quot;chef_type&quot;: &quot;role&quot;,\r\n &quot;override_attributes&quot;: {\r\n }\r\n}<\/pre>\n<p><strong>where:<\/strong><\/p>\n<ul>\n<li>\u201cwebserver\u201d is the name of the role<\/li>\n<li>\u201cenv_run_lists\u201d is a hash of per-environment run-lists for production, preprod, test, and dev<\/li>\n<li>\u201cproduction\u201d and \u201cpreprod\u201d use the default run-list because they do not have a per-environment run-list<\/li>\n<li>\u201crun_list\u201d defines the default run-list<\/li>\n<\/ul>\n<p><strong>Reference<\/strong><br \/>\nhttps:\/\/docs.chef.io\/run_lists.html<br \/>\nhttps:\/\/railsware.com\/blog\/2013\/09\/26\/getting-started-with-chef-server-part-2\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>run-list A run-list defines all of the information necessary for Chef to configure a node into the desired state. A [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":5023,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[88],"tags":[407,4917,852,4918],"class_list":["post-4942","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-chef","tag-chef","tag-env_run_list","tag-role","tag-run_list"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>run_list and env_run_list explanined in chef role - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/run_list-and-env_run_list-explanined-in-chef-role\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"run_list and env_run_list explanined in chef role - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"run-list A run-list defines all of the information necessary for Chef to configure a node into the desired state. A [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/run_list-and-env_run_list-explanined-in-chef-role\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2018-05-03T06:31:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-27T09:07:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/05\/chef.png\" \/>\n\t<meta property=\"og:image:width\" content=\"600\" \/>\n\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"scmgalaxy K\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"scmgalaxy K\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/run_list-and-env_run_list-explanined-in-chef-role\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/run_list-and-env_run_list-explanined-in-chef-role\\\/\"},\"author\":{\"name\":\"scmgalaxy K\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\"},\"headline\":\"run_list and env_run_list explanined in chef role\",\"datePublished\":\"2018-05-03T06:31:23+00:00\",\"dateModified\":\"2021-02-27T09:07:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/run_list-and-env_run_list-explanined-in-chef-role\\\/\"},\"wordCount\":289,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/run_list-and-env_run_list-explanined-in-chef-role\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2018\\\/05\\\/chef.png\",\"keywords\":[\"Chef\",\"env_run_list\",\"Role\",\"run_list\"],\"articleSection\":[\"Chef\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/run_list-and-env_run_list-explanined-in-chef-role\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/run_list-and-env_run_list-explanined-in-chef-role\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/run_list-and-env_run_list-explanined-in-chef-role\\\/\",\"name\":\"run_list and env_run_list explanined in chef role - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/run_list-and-env_run_list-explanined-in-chef-role\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/run_list-and-env_run_list-explanined-in-chef-role\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2018\\\/05\\\/chef.png\",\"datePublished\":\"2018-05-03T06:31:23+00:00\",\"dateModified\":\"2021-02-27T09:07:03+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/run_list-and-env_run_list-explanined-in-chef-role\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/run_list-and-env_run_list-explanined-in-chef-role\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/run_list-and-env_run_list-explanined-in-chef-role\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2018\\\/05\\\/chef.png\",\"contentUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2018\\\/05\\\/chef.png\",\"width\":600,\"height\":350},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/run_list-and-env_run_list-explanined-in-chef-role\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"run_list and env_run_list explanined in chef role\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\",\"name\":\"scmgalaxy K\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"caption\":\"scmgalaxy K\"},\"sameAs\":[\"http:\\\/\\\/www.DevOpsSchool.com\"],\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/scmgalaxy\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"run_list and env_run_list explanined in chef role - scmGalaxy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.scmgalaxy.com\/tutorials\/run_list-and-env_run_list-explanined-in-chef-role\/","og_locale":"en_US","og_type":"article","og_title":"run_list and env_run_list explanined in chef role - scmGalaxy","og_description":"run-list A run-list defines all of the information necessary for Chef to configure a node into the desired state. A [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/run_list-and-env_run_list-explanined-in-chef-role\/","og_site_name":"scmGalaxy","article_published_time":"2018-05-03T06:31:23+00:00","article_modified_time":"2021-02-27T09:07:03+00:00","og_image":[{"width":600,"height":350,"url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/05\/chef.png","type":"image\/png"}],"author":"scmgalaxy K","twitter_card":"summary_large_image","twitter_misc":{"Written by":"scmgalaxy K","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/run_list-and-env_run_list-explanined-in-chef-role\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/run_list-and-env_run_list-explanined-in-chef-role\/"},"author":{"name":"scmgalaxy K","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102"},"headline":"run_list and env_run_list explanined in chef role","datePublished":"2018-05-03T06:31:23+00:00","dateModified":"2021-02-27T09:07:03+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/run_list-and-env_run_list-explanined-in-chef-role\/"},"wordCount":289,"commentCount":0,"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/run_list-and-env_run_list-explanined-in-chef-role\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/05\/chef.png","keywords":["Chef","env_run_list","Role","run_list"],"articleSection":["Chef"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/run_list-and-env_run_list-explanined-in-chef-role\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/run_list-and-env_run_list-explanined-in-chef-role\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/run_list-and-env_run_list-explanined-in-chef-role\/","name":"run_list and env_run_list explanined in chef role - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/run_list-and-env_run_list-explanined-in-chef-role\/#primaryimage"},"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/run_list-and-env_run_list-explanined-in-chef-role\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/05\/chef.png","datePublished":"2018-05-03T06:31:23+00:00","dateModified":"2021-02-27T09:07:03+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/run_list-and-env_run_list-explanined-in-chef-role\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/run_list-and-env_run_list-explanined-in-chef-role\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/run_list-and-env_run_list-explanined-in-chef-role\/#primaryimage","url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/05\/chef.png","contentUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/05\/chef.png","width":600,"height":350},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/run_list-and-env_run_list-explanined-in-chef-role\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"run_list and env_run_list explanined in chef role"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102","name":"scmgalaxy K","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","caption":"scmgalaxy K"},"sameAs":["http:\/\/www.DevOpsSchool.com"],"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/scmgalaxy\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/4942","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=4942"}],"version-history":[{"count":3,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/4942\/revisions"}],"predecessor-version":[{"id":5025,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/4942\/revisions\/5025"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media\/5023"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=4942"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=4942"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=4942"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}