split playbook into roles
This commit is contained in:
parent
53bba1751e
commit
62f014d90f
9 changed files with 69 additions and 64 deletions
30
roles/docker/tasks/main.yml
Normal file
30
roles/docker/tasks/main.yml
Normal file
|
@ -0,0 +1,30 @@
|
|||
- name: Install Docker prerequisites
|
||||
apt:
|
||||
pkg:
|
||||
- ca-certificates
|
||||
- curl
|
||||
- gnupg
|
||||
- lsb-release
|
||||
- python3-pip
|
||||
state: latest
|
||||
update_cache: true
|
||||
- name: Add Docker APT key
|
||||
apt_key:
|
||||
url: https://download.docker.com/linux/ubuntu/gpg
|
||||
- name: Add Docker repository
|
||||
apt_repository:
|
||||
repo: "deb https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable"
|
||||
- name: Install Docker packages
|
||||
apt:
|
||||
pkg:
|
||||
- docker-ce
|
||||
- docker-ce-cli
|
||||
- containerd.io
|
||||
- docker-compose-plugin
|
||||
state: latest
|
||||
update_cache: true
|
||||
- name: Install Docker modules for Python
|
||||
pip:
|
||||
name:
|
||||
- docker
|
||||
- docker-compose
|
Reference in a new issue