60 lines
No EOL
1.6 KiB
YAML
60 lines
No EOL
1.6 KiB
YAML
- name: Install apt-transport-https
|
|
apt:
|
|
name: apt-transport-https
|
|
state: present
|
|
|
|
- name: Add an Apt signing key, uses whichever key is at the URL
|
|
ansible.builtin.apt_key:
|
|
url: https://download.docker.com/linux/debian/gpg
|
|
state: present
|
|
keyring: /usr/share/keyrings/docker-archive-keyring.gpg
|
|
|
|
- name: Add specified repository into sources list
|
|
ansible.builtin.apt_repository:
|
|
repo: "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian buster stable"
|
|
state: present
|
|
|
|
- name: Update repositories cache and install "docker-ce" package
|
|
apt:
|
|
name: docker-ce
|
|
update_cache: yes
|
|
|
|
- name: Update repositories cache and install "docker-ce" package
|
|
apt:
|
|
name: docker-ce-cli
|
|
|
|
- name: Update repositories cache and install "docker-ce" package
|
|
apt:
|
|
name: containerd.io
|
|
|
|
- name: Recursively change ownership of a directory
|
|
ansible.builtin.file:
|
|
path: /root/traefic
|
|
state: directory
|
|
recurse: yes
|
|
owner: root
|
|
group: root
|
|
|
|
- name: Template a file to /root/traefic/doicker-compose.yml
|
|
ansible.builtin.template:
|
|
src: docker-compose.j2
|
|
dest: /root/traefic/docker-compose.yml
|
|
owner: root
|
|
group: root
|
|
mode: '0644'
|
|
- name: Install python3-setuptools
|
|
apt:
|
|
name: python3-setuptools
|
|
state: present
|
|
- name: Install docker python package
|
|
pip:
|
|
name: docker
|
|
executable: pip3
|
|
- name: Install docker python package
|
|
pip:
|
|
name: docker-compose
|
|
executable: pip3
|
|
- name: Run `docker-compose up` again
|
|
community.docker.docker_compose:
|
|
project_src: /root/traefic/
|
|
build: no |