mirror of
https://gitea.fenix-dev.com/fenix-gitea-admin/iac-ansible-private.git
synced 2025-10-27 16:53:04 +00:00
Update roles/kube-master/tasks/main.yml
This commit is contained in:
@ -5,25 +5,25 @@
|
|||||||
|
|
||||||
- name: Criar diretório .kube para o usuário ubuntu
|
- name: Criar diretório .kube para o usuário ubuntu
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: /home/ubuntu/.kube
|
path: /home/fenix/.kube
|
||||||
state: directory
|
state: directory
|
||||||
owner: ubuntu
|
owner: fenix
|
||||||
group: ubuntu
|
group: ubuntu
|
||||||
mode: 0755
|
mode: 0755
|
||||||
|
|
||||||
- name: Set up kubeconfig for user
|
- name: Set up kubeconfig for user
|
||||||
copy:
|
copy:
|
||||||
src: /etc/kubernetes/admin.conf
|
src: /etc/kubernetes/admin.conf
|
||||||
dest: /home/ubuntu/.kube/config
|
dest: /home/fenix/.kube/config
|
||||||
remote_src: yes
|
remote_src: yes
|
||||||
owner: ubuntu
|
owner: fenix
|
||||||
group: ubuntu
|
group: ubuntu
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
- name: Install Calico CNI
|
- name: Install Calico CNI
|
||||||
become: yes
|
become: yes
|
||||||
become_user: ubuntu
|
become_user: fenix
|
||||||
shell: |
|
shell: |
|
||||||
kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml
|
kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml
|
||||||
environment:
|
environment:
|
||||||
KUBECONFIG: /home/ubuntu/.kube/config
|
KUBECONFIG: /home/fenix/.kube/config
|
||||||
|
|||||||
Reference in New Issue
Block a user