I am still learning Chef and have few basic questions:
I have multiple cookbooks. Some are related to applications and some are generic ensuring compliance. Compliance cookbook needs to be applied to node less frequently than application configuration. I have multiple roles each dealing with a cookbook. Each cookbook is independent of each other. How can I set this multiple runs of chef-client throughout the day? I heard, chef-client has to run in a thread safe manner and hence question. Any example will be helpful.
This leads to another issue. if in a single cookbook, if I have multiple recipes which may need restart, how I can accomplish this without stopping/killing the rub? Ideally I want to restart the node once when entire run list is complete. I can add restart at the end of default.rb but then I don’t want to restart unless I have at-least one recipe demands, is there a elegant way of I need to set/check attributes/variable etc?
Thanks in advance