put traefik in ansible

This commit is contained in:
Pim Kunis 2023-01-02 17:39:17 +01:00
parent f175f716a5
commit ad607bcc1a
8 changed files with 104 additions and 2 deletions

View file

@ -0,0 +1,26 @@
- name: Create traefik app directory
file:
path: /apps/traefik
state: directory
- name: Create acme file
copy:
content: ""
dest: /apps/traefik/acme.json
force: no
- name: Copy Docker Compose script
copy:
src: "{{ role_path }}/files/docker-compose.yml"
dest: /apps/traefik/docker-compose.yml
- name: Copy traefik.toml
copy:
src: "{{ role_path }}/files/traefik.toml"
dest: /apps/traefik/traefik.toml
- name: Copy services.toml
copy:
src: "{{ role_path }}/files/services.toml"
dest: /apps/traefik/services.toml
- name: Start Docker Compose
docker_compose:
project_src: /apps/traefik
pull: true
remove_orphans: true