#Task10

#Task10


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: Installing Ansible and checking ansible version we have required two vm first controller and second target node.

No alt text provided for this image
No alt text provided for this image

??step 2:we have create inventory file

No alt text provided for this image


?? Step3:check target node properly connected or no ?

No alt text provided for this image

??step 4: first create a folder and that in folder we have create 3 files (1 files ip2.txt 2 files gaurav.html, web.yml )

No alt text provided for this image
No alt text provided for this image


No alt text provided for this image


?step 5 now i have written a command to run the ansible-playbook -v web.yml

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

all the step one by one execute and run

?? step 6 final out :(ip target node=198.168.43.128)

No alt text provided for this image


要查看或添加评论,请登录

Akhilesh Patel的更多文章

社区洞察

其他会员也浏览了