36 lines
663 B
YAML
36 lines
663 B
YAML
- name: Add apt key
|
|
apt_key:
|
|
url: https://download.docker.com/linux/debian/gpg
|
|
|
|
- name: Add docker-ce repository
|
|
apt_repository:
|
|
repo: deb [arch={{ arch | default('armhf') }}] https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable
|
|
state: present
|
|
filename: 'docker'
|
|
|
|
|
|
- meta: flush_handlers
|
|
|
|
- name: Install docker-ce
|
|
apt:
|
|
name:
|
|
- python3-pip
|
|
- docker-ce
|
|
- xfsprogs
|
|
state: present
|
|
|
|
- name: Set groups to pi user
|
|
user:
|
|
name: pi
|
|
groups: docker
|
|
|
|
- meta: flush_handlers
|
|
- name: Install ansible tool docker and docker-compose
|
|
pip:
|
|
name:
|
|
- docker-compose
|
|
executable: pip3
|
|
|
|
|
|
|