VMware PowerCLI: Map datastore name to LUN devicename.
It is not obvious as it is thought to be to map datastore name to LUN devicename in native PowerCLI codes, The esxcli interface exposed to PowerCLI make it very easy.(Tested in ESXi...
View ArticleAutomate Server deployment with Ansible
There are many server automation applications in the market: puppet,chef,cfengine and salt. Ansible is relatively new, but I think it is better than puppet in server deployment automation tasks.1....
View ArticleSetup SAN Boot for RHEL 6.x using native multipath on EMC storage
Requirements:1) RHEL 6.x (most apply to RHEL 5.x too, RHEL 5.x use mkinitrd instead of Dracut and the /etc/multipath.conf is slightly different refer to Red Hat KB in reference section)2) EMC storage...
View ArticleBuild Puppet module to use Hiera lookup
Puppet can use Hiera to look up data. This helps you disentangle site-specific data from Puppet code, for easier code re-use and easier management of data that needs to differ across your node...
View ArticlePython script to run remote SSH commands with sudo permission
I created a Python script to run remote SSH command with sudo permission. Linux SSH command doesn’t support password as command option, you have to use expect script to connect to multiple servers for...
View ArticleAnsible - turn values in CSV file into list of dictonary
Ansible can load yaml values into Ansible variable easily, However I am still fan of plain CSV file, because it is easy to edit and has no strict format and repetitive of variable names.How to convert...
View ArticlePython script to generate Ansible ini inventory file from csv file
Ansible in memory inventory file created by add_host is often used in AWS EC2 provisioning. Inventory file can be generated easily,however it has drawback. Because it is in memory, all server post...
View ArticleSend Docker container log to Splunk
Docker engine has Splunk logging driver to send container logs to Splunk via HEC(http event collector. It is easy to setup, however it could suffer data loss if HEC is down. That is the advantage of...
View ArticleBuild Custom AWS Config rules using Guard DSL
I want to use AWS config to report S3 buckets without public blocking enabled except for some buckets with prefix like www, there is a AWS managed rule which can achieve this with a limitation: the...
View Article