- From: Xabier de Zuazo <
>
- To:
- Subject: [chef] Re: Confused about env_run_lists
- Date: Tue, 25 Jun 2013 17:31:20 +0200
- Organization: Onddo Labs, S.L.
On Tue, 25 Jun 2013 10:23:08 +0300
Mike Tewner
<
>
wrote:
>
Related to this thread, on the "Essentials
>
Roles<http://docs.opscode.com/essentials_roles.html>"
>
wiki page, there is an open issue since 22SEP2011 (
>
CHEF-2636<http://tickets.opscode.com/browse/CHEF-2636> )
>
concerning the wording of the env_run_list section:
>
>
The section states clearly that you NEED a "_default" configuration:
>
>
> Optional. A list of environments, each specifying a recipe or a
>
> role that will be applied to that environment. This setting must
>
> specify the _default environment. If the _default environment is
>
> set to [] or nil, then the run list will be empty. jamescott: SEE
>
> CHEF-2636.
>
>
>
But in all-but-one subsequent examples, there is no "_default":
>
>
env_run_lists "prod" => ["recipe[apache2]"],
>
> "staging" => ["recipe[apache2::staging]"
>
>
>
and later in the page:
>
>
> env_run_lists "name" => ["recipe[name]"], "environment_name" =>
>
> ["recipe[name::attribute]"]
>
>
>
and:
>
>
"env_run_lists" : {
>
> "production" : [],
>
> "preprod" : [],
>
> "dev": [
>
> "role[base]",
>
> "recipe[apache]",
>
> "recipe[apache::copy_dev_configs]",
>
> ],
>
These examples do not need the "_default" because they use
the "run_list" attribute to set the default run list. Something like
this:
>
"env_run_lists": {
>
"production": [],
>
"preprod": [],
>
[...]
>
},
>
"run_list": [ "role[base]", "recipe[apache]" ],
So you do not need to create a "_default" key there. This is equivalent
to:
>
"env_run_lists": {
>
"default": [ "role[base]", "recipe[apache]" ],
>
"production": [],
>
"preprod": [],
>
[...]
>
},
I know this can be confusing.
IMHO we should clarify this in the "env_run_lists" and "run_lists"
sections.
--
Xabier de Zuazo Oteiza
IT System Administrator - Onddo Labs S.L.
www.onddo.com
--------------------------------------------------------------------
Public Key =
http://www.onddo.com/xabier_zuazo.pub
Key Fingerprint = 8EFA 5B17 7275 5F1F 42B2 26B4 8E18 8B67 9DE1 9468
--------------------------------------------------------------------
Attachment:
signature.asc
Description: PGP signature
Archive powered by MHonArc 2.6.16.