- From: Noah Kantrowitz <
>
- To:
- Subject: [chef] Re: env_run_list vs run_list
- Date: Mon, 23 Apr 2012 11:36:59 -0700
On Apr 20, 2012, at 12:57 PM, Sachin Sagar Rai wrote:
>
I'm confused regarding the `env_run_lists` in the following
>
`roles/base.rb`. And this didn't
>
http://wiki.opscode.com/display/chef/Roles#Roles-envrunlists make me clear
>
enough.
>
>
name "base"
>
description "Base role applied to all nodes."
>
run_list(
>
"recipe[apt]",
>
"recipe[build-essential]",
>
"recipe[git]",
>
"recipe[zsh]",
>
"recipe[users::sysadmins]",
>
"recipe[sudo]",
>
)
>
>
env_run_lists(
>
"production" => ["recipe[chef-client]"],
>
"staging" => [])
>
)
>
>
When I run the `knife ec2 server create -E staging ....`, i.e. in the
>
`staging` environment, the node's run_list is blank.
>
>
Is this the expected behavior? I was thinking that the `env_run_lists`
>
items would be added up with the items in the above `run_list` items, just
>
like the rails app's `config/database.yml`
As mentioned on the wiki page, the env run list is an override, so it totally
replaces the default non-env run list if the env matches. Otherwise there
would be no way to remove items and ordering would be much harder to grok.
--Noah
Attachment:
signature.asc
Description: Message signed with OpenPGP using GPGMail
Archive powered by MHonArc 2.6.16.