master #1

Merged
tim merged 30 commits from tim/k3s-ansible:master into master 2024-01-29 22:00:05 +01:00
2 changed files with 12 additions and 0 deletions
Showing only changes of commit 3f06a11c8d - Show all commits

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
.env/
*.log
ansible.cfg
kubeconfig

View File

@@ -46,3 +46,14 @@
roles:
- role: k3s_server_post
become: true
- name: Storing kubeconfig in the playbook directory
hosts: master
environment: "{{ proxy_env | default({}) }}"
tasks:
- name: Copying kubeconfig from {{ hostvars[groups[group_name_master | default('master')][0]]['ansible_hostname'] }}
ansible.builtin.fetch:
src: "{{ ansible_user_dir }}/.kube/config"
dest: ./kubeconfig
flat: true
when: ansible_hostname == hostvars[groups[group_name_master | default('master')][0]]['ansible_hostname']