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:
@ -38,14 +38,6 @@
|
|||||||
delay: 6
|
delay: 6
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Instalar Flannel com interface e CIDR específicos
|
|
||||||
hosts: kube_masters
|
|
||||||
become: true
|
|
||||||
vars:
|
|
||||||
flannel_iface: eth1 # interface ligada à bridge isolada (ex: vmbr1)
|
|
||||||
flannel_cidr: 192.168.3.0/16 # CIDR exclusivo para este cluster
|
|
||||||
tasks:
|
|
||||||
|
|
||||||
- name: Fazer download do manifest oficial do Flannel
|
- name: Fazer download do manifest oficial do Flannel
|
||||||
get_url:
|
get_url:
|
||||||
url: https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml
|
url: https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml
|
||||||
@ -55,7 +47,7 @@
|
|||||||
replace:
|
replace:
|
||||||
path: /tmp/kube-flannel.yml
|
path: /tmp/kube-flannel.yml
|
||||||
regexp: '10\.244\.0\.0/16'
|
regexp: '10\.244\.0\.0/16'
|
||||||
replace: '{{ flannel_cidr }}'
|
replace: '192.168.3.0/16'
|
||||||
|
|
||||||
- name: Forçar uso da interface correta
|
- name: Forçar uso da interface correta
|
||||||
replace:
|
replace:
|
||||||
@ -70,7 +62,7 @@
|
|||||||
- /opt/bin/flanneld
|
- /opt/bin/flanneld
|
||||||
- --ip-masq
|
- --ip-masq
|
||||||
- --kube-subnet-mgr
|
- --kube-subnet-mgr
|
||||||
- --iface={{ flannel_iface }}
|
- --iface=eth1
|
||||||
|
|
||||||
- name: Aplicar o manifest do Flannel
|
- name: Aplicar o manifest do Flannel
|
||||||
shell: |
|
shell: |
|
||||||
|
|||||||
Reference in New Issue
Block a user