mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-10-29 22:03:22 -02:30
fix: skip None resolvconf paths on Ansible Core 2.19 (#13557)
Empty base/head facts render to None on Ansible Core 2.19, which difference(['']) does not remove. Use select to drop both. Co-authored-by: Shuu <shuu.n@protonmail.com>
This commit is contained in:
co-authored by
Shuu
parent
b33027ba09
commit
25be587fdd
@@ -27,7 +27,7 @@
|
|||||||
regexp: '^{{ item[1] }}[^#]*(?=# Ansible entries BEGIN)'
|
regexp: '^{{ item[1] }}[^#]*(?=# Ansible entries BEGIN)'
|
||||||
backup: "{{ not resolvconf_stat.stat.islnk }}"
|
backup: "{{ not resolvconf_stat.stat.islnk }}"
|
||||||
with_nested:
|
with_nested:
|
||||||
- "{{ [resolvconffile, base | default(''), head | default('')] | difference(['']) }}"
|
- "{{ [resolvconffile, base | default(''), head | default('')] | select | list }}"
|
||||||
- [ 'search\s', 'nameserver\s', 'domain\s', 'options\s' ]
|
- [ 'search\s', 'nameserver\s', 'domain\s', 'options\s' ]
|
||||||
notify: Preinstall | propagate resolvconf to k8s components
|
notify: Preinstall | propagate resolvconf to k8s components
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
replace: '\1'
|
replace: '\1'
|
||||||
backup: "{{ not resolvconf_stat.stat.islnk }}"
|
backup: "{{ not resolvconf_stat.stat.islnk }}"
|
||||||
with_nested:
|
with_nested:
|
||||||
- "{{ [resolvconffile, base | default(''), head | default('')] | difference(['']) }}"
|
- "{{ [resolvconffile, base | default(''), head | default('')] | select | list }}"
|
||||||
- [ 'search\s', 'nameserver\s', 'domain\s', 'options\s' ]
|
- [ 'search\s', 'nameserver\s', 'domain\s', 'options\s' ]
|
||||||
notify: Preinstall | propagate resolvconf to k8s components
|
notify: Preinstall | propagate resolvconf to k8s components
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user