Monthly Archives: August 2016

Using optparse in python

Sometimes we have to create tools that takes input as argument with certain options. We can create such tool with optparse module of python. Here is a small example of using this.   For help, type: ( This will display all … Continue reading

Posted in ARTICLES, DevOps, HOWTO, Programming, TIPS & T RICS | Tagged , , | Leave a comment

Happy 25th birthday GNU/Linux

Image | Posted on by | Leave a comment

Send mail using Python’s smtplib module

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).      

Posted in ARTICLES, DevOps, HOWTO, Programming, SCRIPTING, TIPS & T RICS | Tagged , , , | Leave a comment

Knife remove all recipes from the run_list

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

Posted in ARTICLES, DevOps, HOWTO, TIPS & T RICS | Tagged , , | Leave a comment

Chef – Create encrypted data bag and keep secrets

Sometimes we have to deal with global variables like User passwords, database password, API Keys, middleware boot properties in our chef recipes which shouldn’t be exposed outside. One solution is we have to keep all the secrets in a data … Continue reading

Posted in ARTICLES, DevOps, HOWTO, OperatingSystem, Programming, SCRIPTING | Tagged , , , , | 1 Comment

Chef – Deleting existing attributes

Sometimes we face situation like : May need to remove some persistent attributes which we set a flag after some work is done May be we set some attributes wrong so need to remove and reset the existing attribute. The … Continue reading

Posted in ARTICLES, DevOps, HOWTO, TIPS & T RICS | Tagged , , , , | Leave a comment