Dynamically load a role?


#1

I know I can add a role to a node’s run_list by doing node.run_list <<
“role[myrole]”

The problem is that the role’s attributes aren’t applied until the next
chef-client run. Is there any way to dynamically load a role so that the
new attributes are available immediately?

Thanks


John


#2

On Jan 16, 2012, at 2:39 PM, John Alberts wrote:

I know I can add a role to a node’s run_list by doing node.run_list << “role[myrole]”

The problem is that the role’s attributes aren’t applied until the next chef-client run. Is there any way to dynamically load a role so that the new attributes are available immediately?

Not really, a better way would be to have the info in a data bag that you look up in the recipe.

–Noah