feat: add task for copying admin configurations
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
- name: Copy Kubernetes Admin configuration
|
||||
block:
|
||||
- name: Ensure .kube directory
|
||||
ansible.builtin.file:
|
||||
path: "{{ ansible_facts['env']['HOME'] }}/.kube"
|
||||
state: directory
|
||||
owner: "{{ ansible_facts['user_id'] }}"
|
||||
group: "{{ ansible_facts['user_id'] }}"
|
||||
mode: "0755"
|
||||
- name: Copy Admin configuration
|
||||
ansible.builtin.copy:
|
||||
src: /etc/kubernetes/admin.conf
|
||||
dest: "{{ ansible_facts['env']['HOME'] }}/.kube/config"
|
||||
remote_src: true
|
||||
owner: "{{ ansible_facts['user_id'] }}"
|
||||
group: "{{ ansible_facts['user_id'] }}"
|
||||
mode: "0600"
|
||||
Reference in New Issue
Block a user