This commit is contained in:
parent
7a9cc7cc1c
commit
c02a164bb9
12
playbook.yml
12
playbook.yml
@ -178,6 +178,7 @@
|
||||
gather_facts: false
|
||||
vars_files:
|
||||
- applications.k3s.yml
|
||||
- cluster.k3s.yml
|
||||
tasks:
|
||||
|
||||
- name: Initialize tempfile
|
||||
@ -191,6 +192,17 @@
|
||||
content: "{{ ( lookup('dict', hostvars) )[0].value.cluster.kubeconfig }}"
|
||||
mode: 0600
|
||||
|
||||
- name: Replace API url
|
||||
ansible.builtin.replace:
|
||||
path: "{{ kubeconfig.path }}"
|
||||
regexp: '(server:)127\.0\.0\.1(:6443)$'
|
||||
replace: "\1{{ cluster.virtualip | ansible.utils.netaddr('ipaddr') }}\2"
|
||||
- ansible.builtin.slurp:
|
||||
src: "{{ kubeconfig.path }}"
|
||||
register: foo
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ foo.content | b64decode | trim }}"
|
||||
|
||||
- name: Add Helm chart repositories
|
||||
kubernetes.core.helm_repository:
|
||||
name: "{{ item.name }}"
|
||||
|
Loading…
Reference in New Issue
Block a user