conductor-setup/site-prod.yaml

45 lines
1.2 KiB
YAML
Raw Permalink Normal View History

2021-02-16 12:26:19 +01:00
---
2021-02-16 14:58:21 +01:00
- hosts: prod_infra
2021-02-16 18:50:05 +01:00
vars_files:
- roles/external-postgres/defaults/vault_main.yaml
2021-02-16 12:26:19 +01:00
vars:
cluster_check: true
conductor_workers_server: http://conductor-server:8080/api
2021-02-17 13:13:17 +01:00
postgres_jdbc_pass: '{{ jdbc_pass }}'
2021-02-16 12:26:19 +01:00
roles:
- common
- external-postgres
- elasticsearch
- cluster-replacement
- conductor
- workers
tasks:
- name: Start es
docker_stack:
2021-02-16 14:48:41 +01:00
name: "conductor-{{ infrastructure }}"
2021-02-16 12:26:19 +01:00
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:
2021-02-16 14:48:41 +01:00
name: "conductor-{{ infrastructure }}"
2021-02-16 12:26:19 +01:00
state: present
compose:
- "{{ target_path }}/conductor-swarm.yaml"
when: dry is not defined or not dry|bool
- name: Start workers
docker_stack:
2021-02-16 14:48:41 +01:00
name: "conductor-{{ infrastructure }}"
2021-02-16 12:26:19 +01:00
state: present
compose:
- "{{ target_path }}/conductor-workers-swarm.yaml"
when: dry is not defined or not dry|bool