This commit is contained in:
Kekskurse 2021-10-13 13:22:25 +02:00
parent 5d472d858a
commit b41930f543
Signed by: kekskurse
GPG key ID: 728ACCB59341E7E4
4 changed files with 42 additions and 13 deletions

12
tasks/composer.yml Normal file
View file

@ -0,0 +1,12 @@
- 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

View file

@ -42,18 +42,8 @@
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/

View file

@ -1,2 +1,8 @@
- name: Install Docker
include: docker.yml
include: docker.yml
- name: Install Docker
include: composer.yml
- name: Install Traefic
include: traefic.yml

21
tasks/traefic.yml Normal file
View file

@ -0,0 +1,21 @@
- 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: Run `docker-compose up` again
community.docker.docker_compose:
project_src: /root/traefic/
build: no