diff options
| author | alex <alex@pdp7.net> | 2023-03-25 17:32:58 +0100 |
|---|---|---|
| committer | alex <alex@pdp7.net> | 2023-03-25 17:33:41 +0100 |
| commit | fd237fd5f7851e320a76367253afa663386e8779 (patch) | |
| tree | 9ed95aa0de7b7d5a823c586f5bb2bd0ef888f23a | |
| parent | c4e82554ff5696d46abc83e314814094c38cea86 (diff) | |
Set endpoint in talosconfig
| -rw-r--r-- | personal_infra/playbooks/roles/talos/tasks/main.yaml | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/personal_infra/playbooks/roles/talos/tasks/main.yaml b/personal_infra/playbooks/roles/talos/tasks/main.yaml index 4859d4a9..4c8f54a6 100644 --- a/personal_infra/playbooks/roles/talos/tasks/main.yaml +++ b/personal_infra/playbooks/roles/talos/tasks/main.yaml @@ -61,9 +61,16 @@ 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" |
