Added handler to restart Traefik on config changes
This commit is contained in:
parent
a43b038b68
commit
07a794e969
5
roles/traefik/handlers/main.yml
Normal file
5
roles/traefik/handlers/main.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
- name: Restart Traefik container
|
||||||
|
docker_container:
|
||||||
|
name: "{{ traefik_name }}"
|
||||||
|
image: traefik:{{ traefik_version }}
|
||||||
|
restart: true
|
@ -2,11 +2,13 @@
|
|||||||
copy:
|
copy:
|
||||||
src: traefik.yml
|
src: traefik.yml
|
||||||
dest: traefik.yml
|
dest: traefik.yml
|
||||||
|
notify: Restart Traefik container
|
||||||
|
|
||||||
- name: Start Traefik container
|
- name: Start Traefik container
|
||||||
docker_container:
|
docker_container:
|
||||||
name: "{{ traefik_name }}"
|
name: "{{ traefik_name }}"
|
||||||
image: traefik:{{ traefik_version }}
|
image: traefik:{{ traefik_version }}
|
||||||
|
state: started
|
||||||
restart_policy: always
|
restart_policy: always
|
||||||
ports:
|
ports:
|
||||||
- "{{ traefik_port }}:80"
|
- "{{ traefik_port }}:80"
|
||||||
|
Loading…
Reference in New Issue
Block a user