Skip to content

Commit

Permalink
Merge pull request #87 from k-t-yukana/traefik/run_with_only_one_machine
Browse files Browse the repository at this point in the history
Changed to deploy traefik on only one machine
  • Loading branch information
stelcheck authored Sep 20, 2019
2 parents beecadf + e4c028b commit 1483234
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docker-image/ansible/roles/traefik/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@
register: traefik_config_file_status

- name: "Start traefik on the cluster"
when: traefik_stack_file_status.changed|bool or traefik_config_file_status.changed|bool
when:
- groups['edge'][0] == inventory_hostname
- traefik_stack_file_status.changed|bool or traefik_config_file_status.changed|bool
shell: "docker stack deploy -c '{{ traefik_stack_file }}' {{ traefik_stack }}"

0 comments on commit 1483234

Please sign in to comment.