Task 14

Mukul Jeveriya
4 min readJan 17, 2022

--

Task Description

đź”° 14.1 Create a network Topology Setup in such
a way so that System A can ping to two Systems
System B and System C but both these systems should
not be pinging each other without using any security rule
e.g firewall etc.

🔰 14.2 Further in ARTH — Task 10 have to create an
Ansible playbook that will retrieve newContainer IP
and update the inventory. So that further Configuration
of Webserver could be done inside that Container.

đź”° 14.3 Create an Ansible Playbook which will dynamically
load the variable file named same as OS_name and just by
using the variable names we can Configure our target node.
(Note: No need to use when keyword here.)

Lets Do it firstly 14.1

Task 14.3

Ansible and Docker should be install in the machine

Launch Docker Container…

cmd: docker run -it  --name  <Container_Name>  <docker_image_name>:<version>

Install required packages in the docker container…

* To install SSH server
cmd: yum install openssh-server -y*
To install SSH client
cmd: yum install openssh-clients -y*
To install passwd
cmd: yum install passwd -y

INSTALL PASSWD

  • Set the password for root
cmd: passwd root

NOTE: USE “ ssh-keygen -A” TO AVOID THE KEY ERROR.TO CHECK :

STEP:4: Create an image of the container …

cmd: docker commit <image_id> <image_name>:<version>

Create a playbook to pull pre-created image…

STEP:9: Run the Ansible-playbook…

After running playbook inventory is:

Thanks for reading and i hope you will like the Blog!!!

--

--