Remove Terraform state role

This commit is contained in:
Khue Doan 2021-07-21 00:22:17 +07:00
parent d09a52eb7b
commit 59fbd17a14
No known key found for this signature in database
GPG Key ID: 4C1A90A461B3C27B
4 changed files with 0 additions and 23 deletions

View File

@ -8,9 +8,3 @@
gather_facts: no
roles:
- wake
- name: Create Terraform state storage
hosts: metal[0]
gather_facts: no
roles:
- tfstate

View File

@ -1 +0,0 @@
etcd_port: 23799

View File

@ -1,11 +0,0 @@
- name: Wait for etcd
wait_for:
port: 23799
host: '{{ ansible_ssh_host }}'
connection: local
- name: Generate Terraform backend config
delegate_to: localhost
template:
src: backend.tfvars.j2
dest: "{{ playbook_dir }}/../infra/backend.tfvars"

View File

@ -1,5 +0,0 @@
endpoints = [
{% for host in ansible_play_hosts %}
"{{ hostvars[host].ansible_host }}:{{ etcd_port }}",
{% endfor %}
]