- From: ItsMikeE <
>
- To:
- Subject: [chef] Re: Re: Re: Re: Re: How do I test an attribute value in an
- Date: Mon, 27 Jun 2011 01:29:38 -0700 (PDT)
Thanks for the response
That helps, but still leaves me with some questions
Looking at the wiki page on setting attributes
Default in ../cookbooks/../attributes/default.rb
Example Precedence #1
default["apache"]["dir"] = "/etc/apache2"
Override in .../roles/rolename.rb
Example Precedence #8
override_attributes({ "apache" => {"dir" => "/etc/apache2"}})
How do I reference the attribute inside a recipe?
I don't mind if it is in a case statement, and if statement or an only_if. I
am
just trying to choose between one of two source files to overwrite one
destination file.
Again going back to the wiki I can see
if node.chef.attribute?("webui_enabled")
# set up webui stuff
end
How does that equate to the attributes that were set above?
Is it:
if node.apache.dir?
or
if node.chef.attribute?("apache""dir")
or
something else completely?
I don't really mind if it is in an only_if, or a case statement or an if test.
- [chef] Re: Re: Re: Re: Re: How do I test an attribute value in an, ItsMikeE, 06/27/2011
Archive powered by MHonArc 2.6.16.