You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.4 KiB
YAML
51 lines
1.4 KiB
YAML
3 years ago
|
---
|
||
|
- hosts: dev_infra
|
||
|
vars:
|
||
|
cluster_check: true
|
||
|
infrastructure: dev
|
||
|
conductor_workers_server: http://conductor-server:8080/api
|
||
|
roles:
|
||
|
- common
|
||
|
- databases
|
||
|
- conductor
|
||
|
- workers
|
||
|
- cluster-replacement
|
||
|
tasks:
|
||
|
- name: Start {{ db|default('postgres', true) }} and es
|
||
|
docker_stack:
|
||
|
name: 'conductor-{{ infrastructure }}'
|
||
|
state: present
|
||
|
compose:
|
||
|
- "{{ target_path }}/{{ db|default('postgres', true) }}-swarm.yaml"
|
||
|
- "{{ target_path }}/elasticsearch-swarm.yaml"
|
||
|
when: dry is not defined or not dry|bool
|
||
|
|
||
|
- name: Waiting for databases
|
||
|
pause:
|
||
|
seconds: 20
|
||
|
when: dry is not defined or not dry|bool
|
||
|
|
||
|
- name: Start conductor
|
||
|
docker_stack:
|
||
|
name: "conductor-{{ infrastructure }}"
|
||
|
state: present
|
||
|
compose:
|
||
|
- "{{ target_path }}/conductor-swarm.yaml"
|
||
|
when: dry is not defined or not dry|bool
|
||
|
|
||
|
- name: Start haproxy
|
||
|
docker_stack:
|
||
|
name: 'conductor-{{ infrastructure }}'
|
||
|
state: present
|
||
|
compose:
|
||
|
- "{{ target_path }}/haproxy-swarm.yaml"
|
||
|
when: dry is not defined or not dry|bool
|
||
|
|
||
|
- name: Start workers
|
||
|
docker_stack:
|
||
|
name: "conductor-{{ infrastructure }}"
|
||
|
state: present
|
||
|
compose:
|
||
|
- "{{ target_path }}/conductor-workers-swarm.yaml"
|
||
|
when: dry is not defined or not dry|bool
|