Skip to content

Latest commit

 

History

History
56 lines (30 loc) · 2.3 KB

Ansible-Assignment.md

File metadata and controls

56 lines (30 loc) · 2.3 KB

ANSIBLE ASSIGNMENT

DevOps Workshop Training

$\textcolor{brown}{\text{Contact us: }}$        

T O A C C E L E R A T E Y O U R C A R E E R G R O W T H

For questions and more details:

+91 98712 72900
+91 98712 72900


$\textcolor{red}{\text{NOTE: USE UBUNTU 22.04 VIRTUAL MACHINES FOR ALL THE LABS}}$

Complete below exercises:

Exercise 1: Accomplish below task to complete this exercise:

a) Create two Ubuntu 22.04 compute instances, one for Ansible master and other for slave

b) Install ansible on master Ubuntu GCP instance

c) Establish ssh connectivity between master and slave by copying ssh public key of master to slave's authorized_keys

d) Add the slave node to ansible host file.

e) Run below ansible commands on slave node:

  • i. Ansible ping module to test connectivity of slave from master

  • ii. Ansible setup module to gather facts

  • iii. Ansible command module to run any Linux command on target machine

Exercise 2: Accomplish below task to complete this exercise:

a) Write Ansible playbook with below tasks that will run on slave node:

  • i. Check date on the slave node

  • ii. Install Nginx on the slave node

b) Create an Ansible role to perform above set of tasks using roles on the slave node