Monthly Archives: June 2015

Getting hostname of the system using python

Sometimes we need to get the hostname of the system inside the python programme. This is easy to get, though there are many ways to do it.. #!/usr/bin/env python import socket HostName = socket.gethostname() print HostName Advertisements

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

Puppet Quick Tutorial with examples

Puppet Version Used : 3.8 Distro Used : RHEL,CentOS, OEL 1. Puppet master : Get the repo with below link. rpm -ivh install the master yum install puppet-server Enter the master server hostname in the puppet.conf file under [main] … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Pasting codes or any content in VI editor without being commented.

By default VI editor is in normal mode. So we have to enable the paste mode and to activate this before copying the code type below: :set paste Now go to insert mode by pressing i and paste your code. … Continue reading

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