35 lines
825 B
YAML
35 lines
825 B
YAML
---
|
|
## Main Playbook for the staging DTSV Infrastructure
|
|
|
|
# waiting for terraform provisioning
|
|
|
|
- name: Wait for provisioning
|
|
hosts: label_env_prod
|
|
gather_facts: false
|
|
tasks:
|
|
- name: Wait for instance to become reachable/usable
|
|
wait_for_connection: # host_key_checking must be disabled
|
|
|
|
- name: Gather facts
|
|
setup:
|
|
|
|
- name: Wait for cloud-init to finish
|
|
community.general.cloud_init_data_facts:
|
|
filter: status
|
|
register: res
|
|
until: "res.cloud_init_data_facts.status.v1.stage is defined and not res.cloud_init_data_facts.status.v1.stage"
|
|
retries: 50
|
|
delay: 5
|
|
|
|
# install terraformed servers
|
|
|
|
- name: Install common packages
|
|
hosts: label_env_prod
|
|
roles:
|
|
- common
|
|
- node_exporter
|
|
become: true
|
|
|
|
- import_playbook: db.yml
|
|
- import_playbook: web.yml
|