From: alex Date: Sun, 11 Jun 2023 11:00:17 +0000 (+0200) Subject: Let talosctl overwrite stuff X-Git-Tag: 20240214-emacs~334 X-Git-Url: https://xn--ix-yja.es/gitweb/?a=commitdiff_plain;h=69e5c512f8abf679edaabe1fe98d5750e67419bd;p=alex.git Let talosctl overwrite stuff Seems idempotent and easier --- diff --git a/personal_infra/playbooks/roles/talos/tasks/main.yaml b/personal_infra/playbooks/roles/talos/tasks/main.yaml index 4c8f54a..f9bfa20 100644 --- a/personal_infra/playbooks/roles/talos/tasks/main.yaml +++ b/personal_infra/playbooks/roles/talos/tasks/main.yaml @@ -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"