17 lines
599 B
YAML
17 lines
599 B
YAML
---
|
|
- name: Manage the composition of haproxy as a docker swarm service
|
|
block:
|
|
- name: Install the docker compose file
|
|
template: src=haproxy-docker-compose.yml.j2 dest={{ haproxy_docker_compose_dir }}/docker-compose.yml
|
|
|
|
- name: Run the docker compose file to start the service
|
|
docker_compose:
|
|
project_src: '{{ haproxy_docker_compose_dir }}'
|
|
state: present
|
|
pull: yes
|
|
recreate: smart
|
|
run_once: True
|
|
|
|
when: docker_swarm_manager_main_node is defined and docker_swarm_manager_main_node | bool
|
|
tags: [ 'haproxy', 'docker_haproxy', 'docker_swarm', 'docker' ]
|