]> xn--ix-yja.es Git - alex.git/commitdiff
Set endpoint in talosconfig
authoralex <alex@pdp7.net>
Sat, 25 Mar 2023 16:32:58 +0000 (17:32 +0100)
committeralex <alex@pdp7.net>
Sat, 25 Mar 2023 16:33:41 +0000 (17:33 +0100)
personal_infra/playbooks/roles/talos/tasks/main.yaml

index 4859d4a9f1a5d494685bad0eebe37fd10167ebe6..4c8f54a69a2b43b86f3f0187f35533d20575d574 100644 (file)
   delegate_to: 127.0.0.1
   when: "not 'resources' in nodes or nodes.resources|length == 0"
 
+- name: set talosconfig endpoint
+  shell:
+    cmd: talosctl --talosconfig=talos/talosconfig-{{ talos_host.talos_cluster }} config endpoint {{ inventory_hostname }}
+    chdir: "{{ inventory_dir }}"
+  delegate_to: 127.0.0.1
+  when: "not 'resources' in nodes or nodes.resources|length == 0"
+
 - name: bootstrap cluster
   command:
-    cmd: talosctl bootstrap --nodes {{ inventory_hostname }} --talosconfig talos/talosconfig-{{ talos_host.talos_cluster }} -e {{ inventory_hostname }}
+    cmd: talosctl bootstrap --nodes {{ inventory_hostname }} --talosconfig talos/talosconfig-{{ talos_host.talos_cluster }}
     chdir: "{{ inventory_dir }}"
   delegate_to: 127.0.0.1
   register: bootstrap
@@ -74,7 +81,7 @@
 
 - name: get kubeconfig
   command:
-    cmd: talosctl kubeconfig --talosconfig talos/talosconfig-{{ talos_host.talos_cluster }} --nodes {{ inventory_hostname }} -e {{ inventory_hostname }} -f
+    cmd: talosctl kubeconfig --talosconfig talos/talosconfig-{{ talos_host.talos_cluster }} --nodes {{ inventory_hostname }} -f
     chdir: "{{ inventory_dir }}"
   delegate_to: 127.0.0.1
   when: "not 'resources' in nodes or nodes.resources|length == 0"