Role Attributes in Vagrant

Hi all,

I’m attempting to provision a node in vagrant from a Chef server that uses default attributes in the chef Role to activate certain parts or a recipe.

The run list within the Role runs a “Global Defaults” recipe that sets 4 attributes to “no” and the default attributes in the role should sets one of these to “yes” to activate certain behaviour in the recipe but all 4 are staying set as “no”. Working logic based on documentation here: https://docs.chef.io/roles.html in “Attributes precedence”.

This arrangement works fine in our production (however with a much older version of chef server and chef client).

has anyone experienced something similar / have any ideas on how to fix this?

Thanks

Rob

Rob,

There isn’t anything unique to Vagrant in this context but in order to diagnose we’d need the recipes, role, and Vagrantfile. This is probably something in the recipe/Vagrantfile that is doing something unexpected but still following Attribute Precedence though not in the way you’re expecting. I’d suggest joining us in the Community Slack as that medium will be far more conducive to live assistance and sharing of example code.

Cheers,