mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-10-30 06:13:29 -02:30
refactor: resolve ansible-core 2.19 TODOs now that 2.21 is the minimum (#13588)
This commit is contained in:
@@ -193,10 +193,9 @@
|
|||||||
|
|
||||||
- name: Calico | Configure calico network pool
|
- name: Calico | Configure calico network pool
|
||||||
vars:
|
vars:
|
||||||
_calico_blocksize: "{{ {'spec': {'blockSize': (_calico_pool_cmd.stdout | from_json).spec.blockSize } } }}"
|
_calico_blocksize:
|
||||||
# We need to specify the dict inside jinja because otherwhise the blockSize can become a string
|
spec:
|
||||||
# instead of a int and no amount of | int makes it back into and integer
|
blockSize: "{{ (_calico_pool_cmd.stdout | from_json).spec.blockSize }}"
|
||||||
# TODO: use a normal yaml dict after upgrading to ansible-core 2.19, where the issue does not exist
|
|
||||||
_calico_pool:
|
_calico_pool:
|
||||||
kind: "IPPool"
|
kind: "IPPool"
|
||||||
apiVersion: "projectcalico.org/v3"
|
apiVersion: "projectcalico.org/v3"
|
||||||
@@ -236,10 +235,9 @@
|
|||||||
|
|
||||||
- name: Calico | Configure calico IPv6 network pool
|
- name: Calico | Configure calico IPv6 network pool
|
||||||
vars:
|
vars:
|
||||||
_calico_blocksize_ipv6: "{{ {'spec': {'blockSize': (_calico_pool_ipv6_cmd.stdout | from_json).spec.blockSize } } }}"
|
_calico_blocksize_ipv6:
|
||||||
# We need to specify the dict inside jinja because otherwhise the blockSize can become a string
|
spec:
|
||||||
# instead of a int and no amount of | int makes it back into and integer
|
blockSize: "{{ (_calico_pool_ipv6_cmd.stdout | from_json).spec.blockSize }}"
|
||||||
# TODO: use a normal yaml dict after upgrading to ansible-core 2.19, where the issue does not exist
|
|
||||||
_calico_pool_ipv6:
|
_calico_pool_ipv6:
|
||||||
kind: "IPPool"
|
kind: "IPPool"
|
||||||
apiVersion: "projectcalico.org/v3"
|
apiVersion: "projectcalico.org/v3"
|
||||||
|
|||||||
@@ -179,8 +179,7 @@
|
|||||||
|
|
||||||
- name: Reset | unmount kubelet dirs
|
- name: Reset | unmount kubelet dirs
|
||||||
command: umount -f {{ item }}
|
command: umount -f {{ item }}
|
||||||
# TODO: use a simple default after ansible-core>=2.19
|
loop: "{{ mounted_dirs.ansible_facts.aggregate_mounts | default([])
|
||||||
loop: "{{ (mounted_dirs.ansible_facts.aggregate_mounts if mounted_dirs.ansible_facts is defined else [])
|
|
||||||
| map(attribute='mount')
|
| map(attribute='mount')
|
||||||
| select('match', '/var/lib/kubelet/.*') | reverse }}"
|
| select('match', '/var/lib/kubelet/.*') | reverse }}"
|
||||||
register: umount_dir
|
register: umount_dir
|
||||||
|
|||||||
Reference in New Issue
Block a user