[chef] Re: Re: [Chef] Attribute precedence and Persistence issue.


Chronological Thread 
  • From: Mrigesh Priyadarshi < >
  • To:
  • Subject: [chef] Re: Re: [Chef] Attribute precedence and Persistence issue.
  • Date: Sat, 23 Nov 2013 10:45:13 +0530

Hey Julian,

Our use case is that we have a service portal and we want end users to provision their instance with custom configuration. We want to have a default configuration in cookbook so, if the user doesnt select any custom config for the installs the service portal will not generate any json file. And will run the chef-client with default values defined in cookbook but if they select any configuration chef-client should include those with the json file.

In this scenario, what ever value we pass through the attrib file gets persisted as normal type and doesnt get reset in the next run if the json file is not passed.



Warm Regards,

Mrigesh Priyadarshi
Mob:-+91-720-402-2510
             


On Fri, Nov 22, 2013 at 9:38 PM, Julian C. Dunn < " target="_blank"> > wrote:
On Thu, Nov 21, 2013 at 10:51 PM, Mrigesh Priyadarshi
< "> > wrote:

> I am working on a requirement which states that a particular version of a
> software needs to be installed on a VM and the version could be changed as
> per the user requirement.
>
> I thought to put the default value in attribute and let it be overridden by
> the JSON attrib which can be passed on run time. It works fine but it starts
> cribbing the moment i dont pass the the JSON attrib in next run, in the
> ideal scenario the attribute should fall back to Attribute file to take the
> value.
>
> But in this case it is taking up the value persisted on node which we passed
> in the JSON attrib.

Attributes are always persisted to the node object.

I'm not totally clear on your use case. Chef is for policy compliance.
If software X needs to be installed at version Y on a system, it will
continue ensuring that version Y will be on the system.

- Julian

--
[ Julian C. Dunn < "> >          * Sorry, I'm    ]
[ WWW: http://www.aquezada.com/staff/julian    * only Web 1.0  ]
[ gopher://sdf.org/1/users/keymaker/           * compliant!    ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9       ]




Archive powered by MHonArc 2.6.16.

§