Files
home-cluster/bootstrap/templates/ansible/playbooks/tasks/kubeconfig.yaml.j2
T
Devin Buhl df642e5425 feat: update jinja delimiters back to default (#1269)
* feat: update jinja delimiters back to default

Signed-off-by: Devin Buhl <devin@buhl.casa>

* feat: remove cert-manager promrules

Signed-off-by: Devin Buhl <devin@buhl.casa>

* fix: update talos csr approver

Signed-off-by: Devin Buhl <devin@buhl.casa>

---------

Signed-off-by: Devin Buhl <devin@buhl.casa>
2024-01-29 17:11:37 -05:00

27 lines
881 B
YAML

---
- name: Get absolute path to this Git repository # noqa: command-instead-of-module
ansible.builtin.command: git rev-parse --show-toplevel
delegate_to: localhost
become: false
run_once: true
register: repository_path
changed_when: false
check_mode: false
failed_when: repository_path.rc != 0
- name: Copy kubeconfig to the project directory
when: k3s_primary_control_node
ansible.builtin.fetch:
src: /etc/rancher/k3s/k3s.yaml
dest: "{% raw %}{{ repository_path.stdout }}{% endraw %}/kubeconfig"
flat: true
- name: Update kubeconfig with the correct load balancer address
delegate_to: localhost
become: false
run_once: true
ansible.builtin.replace:
path: "{% raw %}{{ repository_path.stdout }}{% endraw %}/kubeconfig"
regexp: https://127.0.0.1:6443
replace: "https://{% raw %}{{ k3s_registration_address }}{% endraw %}:6443"