diff --git a/roles/network_plugin/calico/tasks/install.yml b/roles/network_plugin/calico/tasks/install.yml index 158b62a9a..455f74840 100644 --- a/roles/network_plugin/calico/tasks/install.yml +++ b/roles/network_plugin/calico/tasks/install.yml @@ -233,10 +233,20 @@ } - name: Calico | Process calico network pool - set_fact: - _calico_pool: "{{ _calico_pool_cmd.stdout | from_json | combine(_calico_pool, recursive=True) }}" when: - _calico_pool_cmd is success + block: + - name: Calico | Get current calico network pool blocksize + set_fact: + _calico_blocksize: > + { + "spec": { + "blockSize": {{ (_calico_pool_cmd.stdout | from_json).spec.blockSize }} + } + } + - name: Calico | Merge calico network pool + set_fact: + _calico_pool: "{{ _calico_pool_cmd.stdout | from_json | combine(_calico_pool, _calico_blocksize, recursive=True) }}" - name: Calico | Configure calico network pool command: @@ -272,10 +282,20 @@ } - name: Calico | Process calico ipv6 network pool - set_fact: - _calico_pool_ipv6: "{{ _calico_pool_ipv6_cmd.stdout | from_json | combine(_calico_pool_ipv6, recursive=True) }}" when: - _calico_pool_ipv6_cmd is success + block: + - name: Calico | Get current calico ipv6 network pool blocksize + set_fact: + _calico_blocksize_ipv6: > + { + "spec": { + "blockSize": {{ (_calico_pool_ipv6_cmd.stdout | from_json).spec.blockSize }} + } + } + - name: Calico | Merge calico ipv6 network pool + set_fact: + _calico_pool_ipv6: "{{ _calico_pool_ipv6_cmd.stdout | from_json | combine(_calico_pool_ipv6, _calico_blocksize_ipv6, recursive=True) }}" - name: Calico | Configure calico ipv6 network pool command: