initial ansible code
This commit is contained in:
34
site.yml
Normal file
34
site.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
## 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
|
||||
Reference in New Issue
Block a user