I am in process of setting up of environment for my applications. This would involve converging of various CHEF recipes,e.g. package installation, Folder creation, nfs mount, etc.
I have to perform these into about 5k+ servers, hencei would like to have some sort of validation for action of the recipes;
To do: Recipe should validate the result of it's actions and log the status so that it can be parsed and populated to a status dashboard later
Consider this as a generic recipe for directory creation.
node['my_cookbook']['directory'].each do |directory|
directory "Applying #{directory['path']} directory configuration" do
path directory['path']
group directory['group']
owner directory['owner']
mode directory['mode']
recursive directory['recursive'] || true
action directory['action'] || :create
end
end
Considering the above what should be the approach?
Is there any specific CHEF resources which we can use to validate?