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

31 lines
668 B
YAML
Raw Normal View History

2023-05-03 21:30:58 +02:00
---
- name: Copy traefik conf
ansible.builtin.copy:
backup: true
src: .
2023-05-03 22:35:19 +02:00
dest: traefik/
2023-05-04 23:03:39 +02:00
register: traefik_copy_results
2023-05-03 22:35:19 +02:00
- name: Create proxy network
community.docker.docker_network:
name: proxy
state: present
become: true
2023-05-04 23:03:39 +02:00
- 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
2023-05-03 22:35:19 +02:00
- name: Update or start container
community.docker.docker_compose:
project_src: traefik
state: present
pull: true
2023-05-04 23:03:39 +02:00
when: not traefik_copy_results.changed
2023-05-03 22:35:19 +02:00
become: true