Variables

We are going to start with the files in the vars folder; we are going to be keeping the vars/main.yml file blank and adding two new files starting with vars/RedHat.yml:

---# vars file for ansible-role-dockerdocker:  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"  edge: "docker-ce-edge"  packages:    - "docker-ce"    - "device-mapper-persistent-data"    - "lvm2"    - "python-setuptools"    - "libselinux-python"  pip:    - "docker"

The next file to add is vars/Debian.yml:

---# vars file for ansible-role-dockerdocker:  gpg_key: "https://download.docker.com/linux/ubuntu/gpg" repo: "deb [arch=amd64] https://download.docker.com/linux/{{ ...

Get Learn Ansible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.