]> xn--ix-yja.es Git - alex.git/commitdiff
Let talosctl overwrite stuff
authoralex <alex@pdp7.net>
Sun, 11 Jun 2023 11:00:17 +0000 (13:00 +0200)
committeralex <alex@pdp7.net>
Sun, 11 Jun 2023 11:00:17 +0000 (13:00 +0200)
Seems idempotent and easier

personal_infra/playbooks/roles/talos/tasks/main.yaml

index 4c8f54a69a2b43b86f3f0187f35533d20575d574..f9bfa201e8d2ab62209df5aeab4dbd22685aaf97 100644 (file)
@@ -42,7 +42,7 @@
 
 - name: generate controlplane config
   shell:
-    cmd: talosctl gen config -t controlplane -o talos/host-{{ inventory_hostname }}.yaml --with-secrets <(ansible-vault view talos/{{ talos_host.talos_cluster }}-secrets.yaml) --config-patch-control-plane @talos/host-{{ inventory_hostname }}.patch {{ talos_host.talos_cluster }} {{ talos_clusters[talos_host.talos_cluster].endpoint }}
+    cmd: talosctl gen config -t controlplane -o talos/host-{{ inventory_hostname }}.yaml --with-secrets <(ansible-vault view talos/{{ talos_host.talos_cluster }}-secrets.yaml) --config-patch-control-plane @talos/host-{{ inventory_hostname }}.patch {{ talos_host.talos_cluster }} {{ talos_clusters[talos_host.talos_cluster].endpoint }} --force
     chdir: "{{ inventory_dir }}"
   delegate_to: 127.0.0.1
   when: "not 'resources' in nodes or nodes.resources|length == 0"
@@ -56,7 +56,7 @@
 
 - name: generate talosconfig
   shell:
-    cmd: talosctl gen config -t talosconfig -o talos/talosconfig-{{ talos_host.talos_cluster }} --with-secrets <(ansible-vault view talos/{{ talos_host.talos_cluster }}-secrets.yaml) {{ talos_host.talos_cluster }} {{ talos_clusters[talos_host.talos_cluster].endpoint }}
+    cmd: talosctl gen config -t talosconfig -o talos/talosconfig-{{ talos_host.talos_cluster }} --with-secrets <(ansible-vault view talos/{{ talos_host.talos_cluster }}-secrets.yaml) {{ talos_host.talos_cluster }} {{ talos_clusters[talos_host.talos_cluster].endpoint }} --force
     chdir: "{{ inventory_dir }}"
   delegate_to: 127.0.0.1
   when: "not 'resources' in nodes or nodes.resources|length == 0"