1
0
Fork 0
myserver-configuration/roles/traefik/tasks/base.yml

24 lines
685 B
YAML
Raw Normal View History

2023-05-03 21:30:58 +02:00
---
2023-05-20 16:07:56 +02:00
- name: Check traefik directory exist
ansible.builtin.file:
path: traefik
state: directory
2023-05-20 15:53:20 +02:00
- name: Copy template conf
ansible.builtin.template:
src: "{{ item.src }}"
dest: "traefik/{{ item.dest }}"
loop:
- { src: 'docker-compose.yml', dest: 'docker-compose.yml' }
- { src: 'config/traefik.yml', dest: 'config/traefik.yml' }
- { src: 'config/dynamic_conf.yml', dest: 'config/dynamic_conf.yml' }
2023-05-20 15:53:20 +02:00
register: traefik_copy_templates_results
2023-05-03 22:35:19 +02:00
2023-05-21 10:57:56 +02:00
- name: Update and restart container
2023-05-04 23:03:39 +02:00
community.docker.docker_compose:
2023-05-20 15:53:20 +02:00
project_src: traefik
state: present
pull: true
restarted: "{{ traefik_copy_templates_results.changed }}"
2023-05-03 22:35:19 +02:00
become: true