mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-06 17:07:38 -02:30
ansible-lint: Don't use bare variables (#4608)
Circumvented one false positive from ansible-lint Moved a block of jinja magic into its own variable
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
424e59805f
commit
a65605b17a
@@ -38,7 +38,7 @@
|
||||
etc_hosts_localhosts_dict: >-
|
||||
{%- set splitted = (item | regex_replace('[ \t]+', ' ')|regex_replace('#.*$')|trim).split( ' ') -%}
|
||||
{{ etc_hosts_localhosts_dict|default({}) | combine({splitted[0]: splitted[1::] }) }}
|
||||
with_items: "{{ (etc_hosts_content['content'] | b64decode).split('\n') }}"
|
||||
with_items: "{{ (etc_hosts_content['content'] | b64decode).splitlines() }}"
|
||||
when:
|
||||
- etc_hosts_content.content is defined
|
||||
- (item is match('^::1 .*') or item is match('^127.0.0.1 .*'))
|
||||
|
||||
Reference in New Issue
Block a user