Source: medium.com

Docker Setup using Ansible

Category: Docker, yaml, ansible

Ansible is an open-source software provisioning, configuration management, and application-deployment tool enabling infrastructure as code. There are multiple reasons why Ansible should be used and some of them are as follows: The list of task performed in this setup are as follows : The Playbook for the same is below as follows , here the language used is YAML , the list of task specified above are executed under “tasks” in the code specified below

Also , as soon as execution starts , Ansible gather facts of target machine and then starts executing the task mentioned , at the end the complete information of container created is displayed using debug module as the task was registered in variable y. Here , the docker.repo file used in task “Setting up Docker repo file” is as follows : This docker.repo file is used for obtaining some dependencies required during installation of Docker . Also in hosts section, Host Group is used as an alias to a single or group of Managed Node’s IP .

Related Articles