initial ansible code

This commit is contained in:
Oli
2022-10-09 21:41:56 +00:00
parent 4a64eab4a0
commit feaec34dd2
103 changed files with 4473 additions and 0 deletions

34
site.yml Normal file
View 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