From b12bc56b095625aa74a8a8531969843462a2b0bd Mon Sep 17 00:00:00 2001 From: Marco Nenciarini Date: Thu, 17 Feb 2022 09:44:18 +0100 Subject: [PATCH] Make sure apt indexes are up-to-date in recovery environment --- agents.tf | 1 - locals.tf | 1 + terraform.tfvars.example | 2 -- variables.tf | 1 - 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/agents.tf b/agents.tf index 46a57c0..276d5e3 100644 --- a/agents.tf +++ b/agents.tf @@ -97,7 +97,6 @@ resource "hcloud_server" "agents" { ] } - network { network_id = hcloud_network.k3s.id ip = cidrhost(hcloud_network_subnet.k3s.ip_range, 513 + count.index) diff --git a/locals.tf b/locals.tf index 6afe266..acb0d21 100644 --- a/locals.tf +++ b/locals.tf @@ -20,6 +20,7 @@ locals { microOS_install_commands = [ "set -ex", + "apt-get update", "apt-get install -y aria2", "aria2c --follow-metalink=mem https://download.opensuse.org/tumbleweed/appliances/openSUSE-MicroOS.x86_64-kvm-and-xen.qcow2.meta4", "qemu-img convert -p -f qcow2 -O host_device $(ls -a | grep -ie '^opensuse.*microos.*qcow2$') /dev/sda", diff --git a/terraform.tfvars.example b/terraform.tfvars.example index d2876d1..323955c 100644 --- a/terraform.tfvars.example +++ b/terraform.tfvars.example @@ -36,5 +36,3 @@ agents_num = 2 # If you would like to specify the k3s upgrade channel from the get go, you can do so, the default is "stable". # For a list of available channels, see https://rancher.com/docs/k3s/latest/en/upgrades/basic/ and https://update.k3s.io/v1-release/channels # k3s_upgrade_channel = "latest" - - diff --git a/variables.tf b/variables.tf index b8ed1d1..e23c2bc 100644 --- a/variables.tf +++ b/variables.tf @@ -96,4 +96,3 @@ variable "automatically_upgrade_k3s" { default = true description = "Whether to automatically upgrade k3s based on the selected channel" } -