mirror of
https://gitea.fenix-dev.com/fenix-gitea-admin/iac-ansible-private.git
synced 2025-10-27 00:33:16 +00:00
Compare commits
3 Commits
47b3cb9bd4
...
880c7b23f1
| Author | SHA1 | Date | |
|---|---|---|---|
| 880c7b23f1 | |||
| 78e1bb9b48 | |||
| 2391d89175 |
@ -22,7 +22,7 @@
|
||||
replace:
|
||||
path: /tmp/kube-flannel.yml
|
||||
regexp: '10\.244\.0\.0/16'
|
||||
replace: '192.168.2.0/24' # .3.
|
||||
replace: '10.244.0.0/16' # .3.
|
||||
|
||||
- name: Corrigir net-conf.json no manifest do Flannel
|
||||
become: true
|
||||
@ -55,7 +55,7 @@
|
||||
argv:
|
||||
- kubeadm
|
||||
- init
|
||||
- --pod-network-cidr=192.168.2.0/24 # .3.
|
||||
- --pod-network-cidr=10.244.0.0/16 # .3.
|
||||
- --apiserver-advertise-address=192.168.1.150
|
||||
creates: /etc/kubernetes/admin.conf
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ with open("/tmp/kube-flannel.yml", "r") as f:
|
||||
for doc in docs:
|
||||
if doc.get("kind") == "ConfigMap" and doc.get("metadata", {}).get("name") == "kube-flannel-cfg":
|
||||
doc["data"]["net-conf.json"] = '''{
|
||||
"Network": "192.168.2.0/24",
|
||||
"Network": "10.244.0.0/16",
|
||||
"Backend": {
|
||||
"Type": "vxlan"
|
||||
},
|
||||
|
||||
@ -23,9 +23,9 @@
|
||||
- node_status.stdout | trim == "NOT_IN_CLUSTER"
|
||||
|
||||
|
||||
- name: Atribuir podCIDR ao nó via hostname real
|
||||
shell: |
|
||||
kubectl patch node {{ node_hostname.stdout }} -p '{"spec":{"podCIDR":"192.168.2.0/24"}}'
|
||||
when:
|
||||
- hostvars['master1']['kubeadm_join_command'] is defined
|
||||
- node_status.stdout | trim == "NOT_IN_CLUSTER"
|
||||
#- name: Atribuir podCIDR ao nó via hostname real
|
||||
# shell: |
|
||||
# kubectl patch node {{ node_hostname.stdout }} -p '{"spec":{"podCIDR":"192.168.2.0/24"}}'
|
||||
# when:
|
||||
# - hostvars['master1']['kubeadm_join_command'] is defined
|
||||
# - node_status.stdout | trim == "NOT_IN_CLUSTER"
|
||||
Reference in New Issue
Block a user