Merge infra and k3 into one directory again

Since I don't have multiple terraform steps anymore it simply doesn't
make sense to me anymore to split all tasks into separate folders.
Instead I try to be as clear as possible in the README to make it easy
to follow the structure in the future without too much headache.
This commit is contained in:
2025-09-21 19:28:08 +02:00
parent fef383fed4
commit 7297892e18
32 changed files with 70 additions and 99 deletions

View File

@@ -0,0 +1,19 @@
- name: Download kube-config
fetch:
src: /etc/rancher/k3s/k3s.yaml
dest: "{{ lookup('env', 'HOME') }}/.kube/config.orig"
flat: True
register: loaded_kube_config
- name: Copy kube-config to correct location
delegate_to: localhost
copy:
src: "{{ lookup('env', 'HOME') }}/.kube/config.orig"
dest: "{{ lookup('env', 'HOME') }}/.kube/config"
when: loaded_kube_config is changed
- name: Use correct ip-address for k8s-cluster
delegate_to: localhost
lineinfile:
path: "{{ lookup('env', 'HOME') }}/.kube/config"
regexp: '^(\s*server: https://).*(:\d+)$'
line: \g<1>{{ k8s_api_endpoint }}\g<2>
backrefs: yes