We are testing our chef setup with our infrastructure and came across an
interesting situation. We have separate roles for each application, to setup
application specific files and environment. These roles have exact same runlist
and override exact same set of attributes (with different values, of course).
For testing, we assigned all the roles to one node.
Now running chef-client on the server resulted in only 1 execution of the
runlist. So we thought that it might be because runlist being resolved to same
set of recipes for all the roles. We then created different recipe for each
application and added it to the corresponding role. Now the roles consist of
different recipes but still override same set of attributes. Chef-client now
runs all the recipes but using the attribute values overridden by the last
role assigned to the node i.e. all the roles are executed using same attribute
I have tried many different combinations but none of them lead to expected
behaviour i.e. ability to run different roles, with same runlist and overriding
same attributes, on the same node.
Any suggestions are highly appreciated.