Ansible and Terraform are market-leading automation tools. These tools are not competing with each other. But great things can be achieved when you combine them together. Terraform is the best multi-cloud provisioning tool for building, changing, and versioning infrastructure efficiently. Ansible on another hand where plays a significant role in configuration management. If the organization […]
Configuration Management
Ansible – How to Prepare template using Variables ? Jinja2
Ansible is very flexible configuration management tool and offers wide range of options to perform certain tasks. I am very often use Jinja2 template option to complete the following tasks. Create configuration files using extra variables Create email templates based on playbook results. Prepare Terraform TF files. Template Config files: 1. Let’s create a new […]
Automation – Add DNS A Record using Ansible Playbook
DNS resource records added automatically when windows instances is registered on domain. For Linux instances, you have to add the records manually on DNS server. Let’s explorer that how to create A records in DNS using Ansible Playbook. This playbook can be integrated as part of server provisioning workflow to speed up the build process. […]
Ansible reboot module – Shutdown Command Not found on Linux
Ansible is a widely used configuration management tool. Opensource community and RedHat aggressively developing to create modules for each task. In Ansible 2.7, reboot module is responsible to reboot the host and wait to come back. But the Linux image development varies for each organization. In some environment, engineers might remove shutdown command from the […]
How to Boost Ansible playbook Speed ?
How to increase the ansible playbook execution speed? One who is running the playbook against more than 100 hosts could witness the slowness if it’s not fine-tuned. Ansible has few configurable parameters which can reduce the playbook execution time significantly. As a result of the fine-tuning ansible, playbook execution time has been reduced from 4hours […]
Jenkins- Ansible -Authenticate Server using Protected Passphrase
Ansible is the most widely used configuration management tool. A recent challenge was to authenticate the servers using a protected passphrase. We have a set of servers which can be authenticated only using a passphrase. This article will provide a step by step procedure to authenticate ansible clients using a private key and protected passphrase. […]
Ansible – Executing sequence of commands using Shell Module
How to execute a sequence of ansible commands in a single task using shell or command module? Its quite often needed to run a sequence of commands irrespective of the results. If you would like to automate the VM post-build, we knew that the template doesn’t have specific packages. Some of the configuration files might […]
Downgrading Ansible Engine on CentOS 7/ RHEL 7
How to downgrade Ansible engine on RHEL 7 / CentOS 7 ?. If you install ansible engine from EPEL repository, it will install the latest ansible engine. I had a hard time with latest ansible engine due to incompatibility with specific tasks. For example, Openshift deployment works fine with Ansible engine 2.7 and fails with […]
Using Date and Timestamp Variable in Ansible Playbook
Timestamp plays a crucial role while automating any job. Timestamp variable would be helpful to capture the current date and time (While gathering facts). In Ansible, we might need to create a file or directory based on the timestamp to make it unique. By default, the ansible engine collects timestamp of the remote systems in […]
Ansible – Reboot Server Using Playbook and Wait for come back
Ansible is a simple configuration management tool. Open source community keeps trying to make the code much simpler on the newer version. Prior to Ansible engine 2.7, To reboot the target hosts, we need to define a block of code to reboot the server and wait until the hosts to come back. Most of the time. making the configuration changes or installing […]









