Ansible: How to use template in Ansible using Jinja2?
Here’s a comprehensive tutorial on Ansible Templates and Jinja2, suitable for engineers or anyone preparing for an advanced Ansible role. 1. What are Ansible Templates? Ansible templates…
Ansible Tutorial: Anatomy of Ansible playbook defined!
host defines the target machines: one or more groups or host patterns, separated by colons that should match hosts in the inventory. all is a group that…
Ansible Connection Options for windows remote Server
Error – Failed to connect to the host via ssh Solution – You need to set ansible_connection=winrm to connect to windows [windows] 13.233.160.153 [windows:vars] ansible_connection=winrm Error –…
Ansible Variable: How can I pass variable to ansible playbook in the command line?
It is possible to set variables at the command line using the –extra-vars (or -e) argument. Variables can be defined using a single quoted string (containing one…
How to specifying multiple groups in a playbook hosts specification?
By design, Ansible executes just one play at a time. Your playbook consists of two plays (the two items in the root-level YAML list defined by the…
Ansible Role Project 1
Step 1 – Create a role which has following specification. Install a webserver httpd # use role/vars/ Add cond…httpd should be done only if RHEL. Copy a…
Ansible Variable Lab & Excercise – Part 6
Assigment 1 – Create a playbook and setup a webserver(httpd) and use httpd as a variable decalared in role var file Assigment 2 – Create a playbook…
Ansible Variable Lab & Excercise – Part 5
Assigment 1 – Create a playbook and setup a webserver(httpd) and use httpd as a variable decalared in inventory. Assigment 2 – Create a playbook and setup…
Run Ansible Adhoc commands or playbook in Local mode
If you are trying to run Ansible Adhoc commands or playbook in Local mode, these articles will help you. Ansible can’t run playbooks locally without ssh if…
Ansible Playbook Lab & Excercise – Part 4
Execution Mode – Remote Write a Ansible Playbook to create a group called “deploy” Write a Ansible Playbook to create a user called “deploy-user” which is part…
