Configure a Webserver on the top of docker using Ansible Playbook
Task Description
Write an Ansible PlayBook that does the following operations in the managed nodes:
🔹 Configure Docker
🔹 Start and enable Docker services
🔹 Pull the httpd server image from the Docker Hub
🔹 Run the docker container and expose it to the public
🔹 Copy the html code in /var/www/html directory and start the web server
step 1 configure docker
for configure the docker first we configure the yum repository for docker in target node using ansible playbook.

verify with controller node :-

Install docker software :-

verify with controller node :-

verify with target node :-

step 2 start and enable docker service

verify with controller node :-

verify with target node:-

step 3 Pull the httpd server image from the Docker Hub

run playbook in controller node:-

verify with target node :

step 4 Run the docker container and expose it to the public

run playbook :-

verify in target node :-

step 5 Copy the html code in /var/www/html directory and start the web server



so its working good
Thank You!
#python #vimaldaga #righteducation #educationredefine #rightmentor #worldrecordholder #linuxworld #makingindiafutureready #righeudcation #arthbylw