]> xn--ix-yja.es Git - alex.git/commitdiff
Fix kubeconfig dumbness
authoralex <alex@pdp7.net>
Sat, 11 Mar 2023 17:51:17 +0000 (18:51 +0100)
committeralex <alex@pdp7.net>
Sat, 11 Mar 2023 17:51:17 +0000 (18:51 +0100)
personal_infra/playbooks/roles/talos/tasks/main.yaml

index 74d19d3fb7b41c73e4c0b8ef6dfbf62924695f46..f0d48c76343b1ef15f323348f8803a117830f9e7 100644 (file)
@@ -1,7 +1,7 @@
 ---
 - name: check node ready
   k8s_info:
-    context: "{{ talos_host.talos_cluster }}@admin"
+    context: "admin@{{ talos_host.talos_cluster }}"
     kind: Node
     wait: true
     wait_condition:
 
 - name: get kubeconfig
   command:
-    cmd: talosctl kubeconfig --talosconfig talos/talosconfig-{{ talos_host.talos_cluster }} --nodes {{ inventory_hostname }} -e {{ inventory_hostname }} --force-context-name {{ talos_host.talos_cluster }}@admin
+    cmd: talosctl kubeconfig --talosconfig talos/talosconfig-{{ talos_host.talos_cluster }} --nodes {{ inventory_hostname }} -e {{ inventory_hostname }} -f
     chdir: "{{ inventory_dir }}"
   delegate_to: 127.0.0.1
   when: "not 'resources' in nodes or nodes.resources|length == 0"
+  throttle: 1
 
 - name: wait node ready
   k8s_info:
-    context: "{{ talos_host.talos_cluster }}@admin"
+    context: "admin@{{ talos_host.talos_cluster }}"
     kind: Node
     wait: true
     wait_condition: