1
0
Fork 0

Add restart if traefik file edited

This commit is contained in:
Florian RICHER 2023-05-04 23:03:39 +02:00
parent 65e686409c
commit 924078fb3f

View file

@ -5,6 +5,7 @@
backup: true
src: .
dest: traefik/
register: traefik_copy_results
- name: Create proxy network
community.docker.docker_network:
@ -12,9 +13,19 @@
state: present
become: true
- name: Force update and restart container
community.docker.docker_compose:
project_src: traefik
state: present
pull: true
restarted: true
when: traefik_copy_results.changed
become: true
- name: Update or start container
community.docker.docker_compose:
project_src: traefik
state: present
pull: true
when: not traefik_copy_results.changed
become: true