From d74cdfa143fdb8f24c3c438230546138002f3b12 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Sat, 19 Feb 2022 22:01:46 +0100 Subject: [PATCH] destroy all --- .../ansible/roles/prereq/tasks/main.yml | 13 ------------- infrastructure/create-resources/hcloud.tf | 6 +++--- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/infrastructure/create-resources/ansible/roles/prereq/tasks/main.yml b/infrastructure/create-resources/ansible/roles/prereq/tasks/main.yml index eb0ad53..7d4ae76 100644 --- a/infrastructure/create-resources/ansible/roles/prereq/tasks/main.yml +++ b/infrastructure/create-resources/ansible/roles/prereq/tasks/main.yml @@ -14,18 +14,5 @@ reload: yes when: ansible_all_ipv6_addresses -# Setup user -- name: Add the user 'kjuulh' and add it to 'sudo' - user: - name: kjuulh - group: sudo - state: present - -- name: "add authorized keys" - authorized_key: - user: kjuulh - state: present - key: "{{ lookup('file', pub_key) }}" - - name: Wait for apt to unlock shell: while sudo fuser /var/lib/dpkg/lock >/dev/null >2&1; do sleep 5; done; diff --git a/infrastructure/create-resources/hcloud.tf b/infrastructure/create-resources/hcloud.tf index aebcfbe..2d08201 100644 --- a/infrastructure/create-resources/hcloud.tf +++ b/infrastructure/create-resources/hcloud.tf @@ -1,10 +1,10 @@ variable "serverctl_master_count" { - default = 1 + default = 0 } variable "serverctl_node_count" { - default = 1 + default = 0 } @@ -76,7 +76,7 @@ resource "local_file" "hosts_cfg" { content = templatefile("${path.module}/templates/hosts.tpl", { serverctl_masters = hcloud_server.serverctl_master.*.ipv4_address - serverctl_nodes = hcloud_server.serverctl_node.*.ipv4_address + serverctl_nodes = hcloud_server.serverctl_node.*.ipv4_address } ) filename = "ansible/inventory/hosts.cfg"