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:
|
||||
src: traefik.yml
|
||||
dest: traefik.yml
|
||||
notify: Restart Traefik container
|
||||
|
||||
- name: Start Traefik container
|
||||
docker_container:
|
||||
name: "{{ traefik_name }}"
|
||||
image: traefik:{{ traefik_version }}
|
||||
state: started
|
||||
restart_policy: always
|
||||
ports:
|
||||
- "{{ traefik_port }}:80"
|
||||
|
Loading…
Reference in New Issue
Block a user