Run the docker tasks for haproxy once.

This commit is contained in:
Andrea Dell'Amico 2020-12-29 22:30:29 +01:00
parent 32a5f67c92
commit 5a5957c584
1 changed files with 4 additions and 1 deletions

View File

@ -8,5 +8,8 @@
template: src=haproxy.cfg.j2 dest=/etc/haproxy/haproxy.cfg owner=root group=root mode='0444'
notify: Reload the HAPROXY configuration
when: docker_swarm_manager
run_once: True
when:
- docker_swarm_manager
- docker_swarm_manager_main_node is defined and docker_swarm_manager_main_node | bool
tags: [ 'haproxy', 'docker_haproxy', 'docker_swarm', 'docker', 'haproxy_conf' ]