This role installs Docker on a Linux system.
- Ansible 2.5+
- Python 2.7+
apt update \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt install -y python3 ansible git
This role has been tested on the following distributions:
- Ubuntu 18.04, 20.04, 22.04
None.
- Create playbook that uses this role:
main.yml:
- name: Install Docker
hosts: localhost
roles:
- ansible-docker
- Create file with requirements:
requirements.yml:
- src: https://github.com/sv222/ansible-docker-role
name: ansible-docker
- Then run the following command to install the role from the requirements.yml:
ansible-galaxy install -r requirements.yml --force
- And after run playbook:
ansible-playbook main.yml
Feel free to contribute to this project by submitting pull requests or reporting issues.
MIT