Update roles/kube-node/tasks/main.yml

This commit is contained in:
2025-10-20 20:21:19 +00:00
parent b016fd12ca
commit 47b3cb9bd4

View File

@ -26,4 +26,6 @@
- name: Atribuir podCIDR ao nó via hostname real - name: Atribuir podCIDR ao nó via hostname real
shell: | shell: |
kubectl patch node {{ node_hostname.stdout }} -p '{"spec":{"podCIDR":"192.168.2.0/24"}}' kubectl patch node {{ node_hostname.stdout }} -p '{"spec":{"podCIDR":"192.168.2.0/24"}}'
when: inventory_hostname in groups['kube_nodes'] when:
- hostvars['master1']['kubeadm_join_command'] is defined
- node_status.stdout | trim == "NOT_IN_CLUSTER"