Use of runtime variables to save into another variable using register in Ansible

Another major use of variables is running a command and using the result of that command to save the result into a variable   – hosts: all tasks: – name: Ansible register variable basic example shell: “find *.txt” args: chdir: “/Users/mdtutorials2/Documents/Ansible” register: find_output – debug: var: find_output # – hosts: all tasks: – name: Ansible… Read More »

How to use template in Ansible?

How to use template in Ansible? ##### Step 1 – Create your inventory file with ##### ##### Step 2 – Create templates directory ##### <strong>##### Step 3 – Create a playbook.yaml#####</strong> ##### Step 4 – Last comamds to execute #####

Ansible Playbook Lab & Excercise – Part 2

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 of group called “group” and with /bin/bash shell. Write a Ansible Playbook to install package named “httpd” in RHEL/centos. Write a Ansible Playbook to start and enable the… Read More »