53 lines
1.4 KiB
YAML
53 lines
1.4 KiB
YAML
---
|
|
- hosts: localhost
|
|
vars_files:
|
|
- roles/workers/defaults/smtp.yaml
|
|
vars:
|
|
infrastructure: "local"
|
|
pymail_password: "{{ smtp_local_pwd }}"
|
|
smtp_local_pwd: ""
|
|
roles:
|
|
- common
|
|
- databases
|
|
- conductor
|
|
- workers
|
|
- pep
|
|
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 pep
|
|
docker_stack:
|
|
name: 'conductor-{{ infrastructure }}'
|
|
state: present
|
|
compose:
|
|
- "{{ target_path }}/pep-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
|