Not all the tasks we run in our playbook are short and sweet. Some of them would take a long time but we cannot afford to sit tight and watch the screen. We got better things to do. Some of the long-running tasks could be Downloading a Big File from[...]
Read moreCategory: Ansible
Add SSH Key to EC2 instances with Ansible - Automated
Whether it is On-Prem (or) Cloud-hosted, A Typical Non-Containerized Enterprise infrastructure would have ample of Virtual Machines aka Servers [ Linux ] Let us suppose that you work for the DevOps team of a Big Organization where you manage 100+ ec2 instances. You have a new hire in your team[...]
Read moreAnsible Shell Module Examples
Ansible shell module is designed to execute Shell commands against the target Unix based hosts. Unlike the Ansible command module, Ansible Shell would accept any highly complexed commands with pipes, redirection etc and you can also execute Shell scripts using Ansible Shell module. The Advantage of Ansible Shell module[...]
Read moreAnsible Git Example - Checkout code from Git Repo Securely
Introduction Ansible works seamlessly with Git and you might have had a requirement to download your source code or software directly from the Github, Bitbucket, Gitlab etc. In this post, we are going to explore various tits and bits of Ansible Git module and how to use it in real-time[...]
Read moreAnsible sudo - ansible become example
Ansible Sudo or Ansible become Introduction Ansible Sudo or become is a method to run a particular task in a playbook with Special Privileges like root user or some other user. In the earlier versions of ansible there is an option named as sudo which is deprecated now, Since ansible[...]
Read moreAnsible Dry Run - How to Run Playbook in Ansible Check mode
Ansible Dry Run or Ansible Check mode feature is to validate your playbook before execution With the Ansible Dry Run feature, you can execute the playbook without having to actually make changes on the server. this enables us to see what changes are going to be made when the playbook[...]
Read moreAnsible Playbook Examples - Sample Ansible Playbooks | Devops Junction
In this post, we are going to see examples of Ansible playbook and various different modules and playbook examples with various modules and multiple hosts. We will start with a basic Ansible playbook and learn what is task and play and what is playbook etc. What is Ansible Playbook It[...]
Read moreHow to Run Ansible Playbook Locally | Devops Junction
In this post, we are going to see how to run the playbook locally on our Localhost on the control machine. How to run Ansible Playbook locally is one of the questions I used to have before I learnt it. Let me tell you how to Run Ansible Playbook Locally[...]
Read moreAnsible get_url Examples - How to download file from URL
In this post, we are going to see how to download a file from URL using ansible get_url module in other words ansible curl. As we know it already, Ansible has a lot of built-in modules to accomplish all the tasks we might need for configuration management and automation. Ansible[...]
Read moreAnsible Command Module Examples
Ansible Command Module Introduction Ansible Command module is used to execute commands on a remote node. The Command module, is used mostly to run simple Linux commands on a remote node/server which is part of a host group or Stand alone server mentioned in the host group. If you want[...]
Read more