- 6,156 hits
- Follow FOSS -THE FUTURE IS HERE on WordPress.com
Tag Archives: DevOps
In chef, when a nested attribute that might not exist/or not crated yet, you can use rescue as a modifier to an if statement. For example, assuming that only some of your nodes have node[‘install_wls’][‘isManaged’]defined: if node[‘install_wls’][‘isManaged’] do the stuff … Continue reading
Some time we have to read one existing json property file and update some values inplace. If we don’t use proper approach, the update may lead to breaking the json structure in the file. We have to hook the json … Continue reading
Python has a built in module to send mail to recipient[s] as to,cc,bcc. Here assumption is that : the smtp is configured in localhost (where the script will run).
There is a simple knife command which can be used to remove all recipes from the run_list of all nodes in a environment. For this you have to create a dummy role like suppose dummy_role. #knife role create dummy_role Once … Continue reading