mirror of
https://gitea.fenix-dev.com/fenix-gitea-admin/iac-ansible-private.git
synced 2025-10-27 00:33:16 +00:00
Update roles/kube-node/tasks/main.yml
This commit is contained in:
@ -5,3 +5,14 @@
|
||||
- name: Join Kubernetes cluster
|
||||
shell: "{{ hostvars['master1']['kubeadm_join_command'] }}"
|
||||
when: hostvars['master1']['kubeadm_join_command'] is defined
|
||||
|
||||
- name: Obter hostname real do nó
|
||||
become: true
|
||||
command: hostname
|
||||
register: node_hostname
|
||||
|
||||
- name: Atribuir podCIDR ao nó via hostname real
|
||||
become: true
|
||||
shell: |
|
||||
kubectl patch node {{ node_hostname.stdout }} -p '{"spec":{"podCIDR":"192.168.2.0/24"}}'
|
||||
when: inventory_hostname in groups['kube_nodes']
|
||||
Reference in New Issue
Block a user