Use connection: local when delegate_to: localhost (#6322)

This will avoid SSH connection on the local host
This commit is contained in:
bozzo
2020-06-25 17:14:38 +02:00
committed by GitHub
parent a6a6e843af
commit 276c450759
12 changed files with 19 additions and 0 deletions

View File

@@ -7,4 +7,5 @@
gather_subset: '!all,network'
filter: "ansible_default_ipv4"
delegate_to: "{{ delegate_host_to_gather_facts }}"
connection: "{{ (delegate_host_to_gather_facts == 'localhost') | ternary('local', omit) }}"
delegate_facts: yes