conductor-setup/site-prod.yaml

47 lines
1.2 KiB
YAML

---
- hosts: prod_infra
vars_files:
- roles/external-postgres/defaults/vault_main.yaml
- roles/workers/defaults/smtp.yaml
vars:
cluster_check: true
conductor_workers_server: http://conductor-server:8080/api
pymail_password: "{{ smtp_prod_pwd }}"
postgres_jdbc_pass: '{{ jdbc_pass }}'
roles:
- common
- external-postgres
- elasticsearch
- cluster-replacement
- conductor
- workers
tasks:
- name: Start es
docker_stack:
name: "conductor-{{ infrastructure }}"
state: present
compose:
- "{{ target_path }}/elasticsearch-swarm.yaml"
when: dry is not defined or not dry|bool
- name: Waiting for databases
pause:
seconds: 5
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 workers
docker_stack:
name: "conductor-{{ infrastructure }}"
state: present
compose:
- "{{ target_path }}/conductor-workers-swarm.yaml"
when: dry is not defined or not dry|bool