Added handler to restart Traefik on config changes

This commit is contained in:
Kris Lamoureux 2019-11-04 19:15:41 -05:00
parent a43b038b68
commit 07a794e969
Signed by: kris
GPG Key ID: 3EDA9C3441EDA925
2 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1,5 @@
- name: Restart Traefik container
docker_container:
name: "{{ traefik_name }}"
image: traefik:{{ traefik_version }}
restart: true

View File

@ -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"