June 2018
Beginner
578 pages
13h 39m
English
I am not going to go into detail about the tasks, as these have already been covered. We can bootstrap the role by running the following command:
$ ansible-galaxy init roles/docker
Now that we have the files in place, we can update the roles/docker/defaults/main.yml file with the following content:
docker: gpg_key: "https://download.docker.com/linux/centos/gpg" repo_url: "https://download.docker.com/linux/centos/docker-ce.repo" repo_path: "/etc/yum.repos.d/docker-ce.repo" packages: - "docker-ce" - "device-mapper-persistent-data" - "lvm2" - "python-setuptools" - "libselinux-python" pip: - "docker"
The content of roles/docker/tasks/main.yml should be:
- name: update all of the installed packages yum: name: "*" state: "latest" ...
Read now
Unlock full access