c12s-kubespray/roles/kubespray-defaults/tasks/fallback_ips_gather.yml
bozzo 276c450759
Use connection: local when delegate_to: localhost (#6322)
This will avoid SSH connection on the local host
2020-06-25 08:14:38 -07:00

12 lines
412 B
YAML

---
# include to workaround mitogen issue
# https://github.com/dw/mitogen/issues/663
- name: "Gather ansible_default_ipv4 from {{ delegate_host_to_gather_facts }}"
setup:
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