Ansible archive module is an ansible way of compressing the file and creating an archive. Just like the tar and gz command working together. If you are a Linux guy you would easily get this analogy. For windows, Just think of this as a normal winzip or WinRAR programs Facts of Ansible archive[...]
Read moreCategory: Ansible
Ansible Template module Examples - Jinja2 Templates | Devops Junction
Ansible template module helps to template a file out to a remote server. Simply put, at runtime ansible template module updates the jinja2 interpolation syntax variables with actual values and copy the template file to the remote server with the specified name. This is most useful for configuration templating and[...]
Read moreAnsible dynamic inventory AWS - How to use
Ansible Dynamic inventory is a wonderful feature to efficiently manage the entire infrastructure, In an ideal world the list of hosts we have in our infrastructure would not be static, the number of hosts would increase or decrease based on the new instance provisioning and server decommissioning. In this variable[...]
Read moreAnsible lookup file - How to Read file into variable in Ansible
In this post, we are going to see how to use ansible lookup and how to read file into ansible playbook using ansible file lookup. Purpose of Ansible Lookups When it comes to automation, we handle different types of data and files such as csv, txt and sometimes we might even need[...]
Read moreAnsible read JSON file - JSON file Parsing
In this article, we are going to see how to read the JSON file in ansible-playbook JSON is the most famous data representation it is widely used to store and transmit data. When you are working in Ansible automation, you might get a requirement to work with JSON files and[...]
Read moreAnsible apt module Examples - install packages with apt | Devops Junction
Ansible APT Package manager is an Ubuntu equivalent for RedHat yum package manager. Just like all other ansible modules apt ansible module is built after one specific unix command of Debian apt-get It is always recommended to choose the modules rather using the raw unix commands over the shell module as it would[...]
Read moreAnsible Find Examples - How to use Ansible Find
Ansible find module functions as same as the Linux Find command and helps to find files and directories based on various search criteria such as age of the file, accessed date, modified date, regex search pattern etcetera. As said earlier, this is more of an ansible way to execute the[...]
Read moreAnsible JSON - Parse JSON using Ansible json_query
Ansible json_query is an on-demand feature that every ansible user wants to explore. In this post we are going to how Ansible JSON processing works. During the infrastructure automation, we might end up in a situation where we need to process Huge datasets, especially in JSON format. We might[...]
Read moreAnsible Unarchive Module Examples
What is Ansible Unarchive Module and How does it work Ansible Unarchive module helps to unpack or uncompress the files from an archive file such as tar, tar.gz, zip . Ansible unarchive module can optionally copy the files to the remote server before uncompressing them. Though the unarchive module is[...]
Read moreAnsible EC2 Example - Create EC2 instance with Ansible
Infrastructure as Code is getting all attention it deserves and everyone is trying to find their way to the `Completely automated Infrastructure Provisioning & Management` While there are a lot of tools available now in the market starting from Terraform, AWS CloudFormation, Chef, Puppet, Salt Stack There are some differences[...]
Read more