diff --git a/metal/main.yml b/metal/main.yml index 956bb25c..4bc6a240 100644 --- a/metal/main.yml +++ b/metal/main.yml @@ -8,9 +8,3 @@ gather_facts: no roles: - wake - -- name: Create Terraform state storage - hosts: metal[0] - gather_facts: no - roles: - - tfstate diff --git a/metal/roles/tfstate/defaults/main.yml b/metal/roles/tfstate/defaults/main.yml deleted file mode 100644 index a8f43f12..00000000 --- a/metal/roles/tfstate/defaults/main.yml +++ /dev/null @@ -1 +0,0 @@ -etcd_port: 23799 diff --git a/metal/roles/tfstate/tasks/main.yml b/metal/roles/tfstate/tasks/main.yml deleted file mode 100644 index 122e9149..00000000 --- a/metal/roles/tfstate/tasks/main.yml +++ /dev/null @@ -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 }}/../cluster/backend.tfvars" diff --git a/metal/roles/tfstate/templates/backend.tfvars.j2 b/metal/roles/tfstate/templates/backend.tfvars.j2 deleted file mode 100644 index 4a285b08..00000000 --- a/metal/roles/tfstate/templates/backend.tfvars.j2 +++ /dev/null @@ -1,5 +0,0 @@ -endpoints = [ -{% for host in ansible_play_hosts %} - "{{ hostvars[host].ansible_host }}:{{ etcd_port }}", -{% endfor %} -]