mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-28 09:39:12 +03:00
Fix E306 in other roles (#6517)
This commit is contained in:
@@ -17,14 +17,20 @@
|
||||
set_fact:
|
||||
docker_dns_search_domains: "{{ docker_dns_search_domains + searchdomains|default([]) }}"
|
||||
|
||||
- name: check system nameservers # noqa 306
|
||||
shell: grep "^nameserver" /etc/resolv.conf | sed -r 's/^nameserver\s*([^#\s]+)\s*(#.*)?/\1/'
|
||||
- name: check system nameservers
|
||||
shell: set -o pipefail && grep "^nameserver" /etc/resolv.conf | sed -r 's/^nameserver\s*([^#\s]+)\s*(#.*)?/\1/'
|
||||
args:
|
||||
executable: /bin/bash
|
||||
changed_when: False
|
||||
register: system_nameservers
|
||||
check_mode: no
|
||||
|
||||
- name: check system search domains # noqa 306
|
||||
- name: check system search domains
|
||||
# noqa 306 - if resolf.conf has no search domain, grep will exit 1 which would force us to add failed_when: false
|
||||
# Therefore -o pipefail is not applicable in this specific instance
|
||||
shell: grep "^search" /etc/resolv.conf | sed -r 's/^search\s*([^#]+)\s*(#.*)?/\1/'
|
||||
args:
|
||||
executable: /bin/bash
|
||||
changed_when: False
|
||||
register: system_search_domains
|
||||
check_mode: no
|
||||
|
||||
@@ -11,9 +11,11 @@
|
||||
notify: restart docker
|
||||
when: http_proxy is defined or https_proxy is defined
|
||||
|
||||
- name: get systemd version # noqa 306
|
||||
- name: get systemd version
|
||||
# noqa 303 - systemctl is called intentionally here
|
||||
shell: systemctl --version | head -n 1 | cut -d " " -f 2
|
||||
shell: set -o pipefail && systemctl --version | head -n 1 | cut -d " " -f 2
|
||||
args:
|
||||
executable: /bin/bash
|
||||
register: systemd_version
|
||||
when: not is_ostree
|
||||
changed_when: false
|
||||
|
||||
Reference in New Issue
Block a user