From 3887b9979b598cb73743a50505884b90af668fb9 Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Sat, 22 Jul 2023 12:06:49 +0200 Subject: [PATCH] change VM architecture --- ansible/inventory/host_vars/manager.yml | 25 ------ ansible/inventory/hosts.yml | 10 +-- terraform/dns.tf | 2 +- terraform/main.tf | 112 ++++++++++++++---------- 4 files changed, 69 insertions(+), 80 deletions(-) delete mode 100644 ansible/inventory/host_vars/manager.yml diff --git a/ansible/inventory/host_vars/manager.yml b/ansible/inventory/host_vars/manager.yml deleted file mode 100644 index 5edb04a..0000000 --- a/ansible/inventory/host_vars/manager.yml +++ /dev/null @@ -1,25 +0,0 @@ -docker_node_labels: - - hostname: maestro - labels: {} - - hostname: swarmpub1 - labels: - public: "true" - mastodon: "true" - - hostname: swarmpub2 - labels: - public: "true" - jitsi: "true" - - hostname: swarmpriv1 - labels: - private: "true" - overleaf: "true" - syncthing: "true" - hedgedoc: "true" - radicale: "true" - - hostname: swarmpriv2 - labels: - private: "true" - seafile: "true" - freshrss: "true" - pihole: "true" - discourse: "true" diff --git a/ansible/inventory/hosts.yml b/ansible/inventory/hosts.yml index aea4b94..b7bce70 100644 --- a/ansible/inventory/hosts.yml +++ b/ansible/inventory/hosts.yml @@ -7,11 +7,5 @@ all: children: workers: hosts: - swarmpub1: - ansible_host: swarmpub1.dmz - swarmpub2: - ansible_host: swarmpub2.dmz - swarmpriv1: - ansible_host: swarmpriv1.dmz - swarmpriv2: - ansible_host: swarmpriv2.dmz + bancomart: + ansible_host: bancomart.dmz diff --git a/terraform/dns.tf b/terraform/dns.tf index 66dca31..9668446 100644 --- a/terraform/dns.tf +++ b/terraform/dns.tf @@ -8,7 +8,7 @@ provider "powerdns" { } resource "powerdns_record" "subdomain_pim" { - for_each = toset(["dav", "git", "meet", "rss", "latex", "md", "swarm", "traefik", "syncthing", "cloud", "pihole", "ntfy", "apprise", "uptime", "concourse", "discourse"]) + for_each = toset(["dav", "git", "meet", "rss", "latex", "md", "swarm", "traefik", "syncthing", "cloud", "pihole", "ntfy", "apprise", "uptime", "concourse"]) zone = "pim.kunis.nl." name = "${each.key}.pim.kunis.nl." type = "CNAME" diff --git a/terraform/main.tf b/terraform/main.tf index 4dc810a..bc82e01 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -1,7 +1,6 @@ terraform { backend "pg" { schema_name = "shoarma" - conn_str = "postgres://terraform@10.42.0.1/terraform_state" } required_providers { @@ -25,58 +24,79 @@ provider "libvirt" { uri = "qemu+ssh://root@jefke.hyp/system" } -module "manager" { - source = "git::https://git.kun.is/home/tf-modules.git//debian" - name = "maestro" - domain_name = "tf-maestro" - memory = 1024 - mac = "CA:FE:C0:FF:EE:08" - hypervisor_host = "atlas.hyp" +module "maestro" { + source = "../../tf-modules/debian" + name = "maestro" + domain_name = "tf-maestro" + memory = 1024 * 10 + mac = "CA:FE:C0:FF:EE:08" providers = { libvirt = libvirt } } -module "swarmpub1" { - source = "git::https://git.kun.is/home/tf-modules.git//debian" - name = "swarmpub1" - domain_name = "tf-swarmpub1" - memory = 1024 * 5 - hypervisor_host = "atlas.hyp" - providers = { - libvirt = libvirt - } -} - -module "swarmpriv1" { - source = "git::https://git.kun.is/home/tf-modules.git//debian" - name = "swarmpriv1" - domain_name = "tf-swarmpriv1" - memory = 1024 * 5 - hypervisor_host = "atlas.hyp" - providers = { - libvirt = libvirt - } -} - -module "swarmpub2" { - source = "git::https://git.kun.is/home/tf-modules.git//debian" - name = "swarmpub2" - domain_name = "tf-swarmpub2" - memory = 1024 * 3 - hypervisor_host = "jefke.hyp" +module "bancomart" { + source = "../../tf-modules/debian" + name = "bancomart" + domain_name = "tf-bancomart" + memory = 1024 * 10 providers = { libvirt = libvirt.jefke } } -module "swarmpriv2" { - source = "git::https://git.kun.is/home/tf-modules.git//debian" - name = "swarmpriv2" - domain_name = "tf-swarmpriv2" - memory = 1024 * 3 - hypervisor_host = "jefke.hyp" - providers = { - libvirt = libvirt.jefke - } -} +#module "manager" { +# source = "git::https://git.kun.is/home/tf-modules.git//debian" +# name = "maestro" +# domain_name = "tf-maestro" +# memory = 1024 +# mac = "CA:FE:C0:FF:EE:08" +# hypervisor_host = "atlas.hyp" +# providers = { +# libvirt = libvirt +# } +#} +# +#module "swarmpub1" { +# source = "git::https://git.kun.is/home/tf-modules.git//debian" +# name = "swarmpub1" +# domain_name = "tf-swarmpub1" +# memory = 1024 * 5 +# hypervisor_host = "atlas.hyp" +# providers = { +# libvirt = libvirt +# } +#} +# +#module "swarmpriv1" { +# source = "git::https://git.kun.is/home/tf-modules.git//debian" +# name = "swarmpriv1" +# domain_name = "tf-swarmpriv1" +# memory = 1024 * 5 +# hypervisor_host = "atlas.hyp" +# providers = { +# libvirt = libvirt +# } +#} +# +#module "swarmpub2" { +# source = "git::https://git.kun.is/home/tf-modules.git//debian" +# name = "swarmpub2" +# domain_name = "tf-swarmpub2" +# memory = 1024 * 3 +# hypervisor_host = "jefke.hyp" +# providers = { +# libvirt = libvirt.jefke +# } +#} +# +#module "swarmpriv2" { +# source = "git::https://git.kun.is/home/tf-modules.git//debian" +# name = "swarmpriv2" +# domain_name = "tf-swarmpriv2" +# memory = 1024 * 3 +# hypervisor_host = "jefke.hyp" +# providers = { +# libvirt = libvirt.jefke +# } +#}