Open BloodBlight opened 7 months ago
Correction, seems to be an issue with the documentation maybe?
Tried switching to IPs, and it gave the same error!
Using this works:
mode: pull
src: /tmp/network_facts.json
dest: "/root/Ansible/facts/{{ inventory_hostname }}_network_facts.json"
dest: /root/Ansible/facts/
Is this a problem with the documentation? https://docs.ansible.com/ansible/latest/collections/ansible/posix/synchronize_module.html
SUMMARY
When using ansible.posix.synchronize to pull from a target that is dual stacked with both IPv4 and IPv6, where the control server only has IPv4 will fail with "No route to host" as it defaults to IPv6.
ISSUE TYPE
COMPONENT NAME
ansible.posix.synchronize
ANSIBLE VERSION
COLLECTION VERSION
This command fails, I assume becuase this is a RHEL 7 box, but running the newest version available:
This is the only module installed.
CONFIGURATION
This is a new install.
OS / ENVIRONMENT
STEPS TO REPRODUCE
ansible-playbook -i hosts collect_network_info.yml
EXPECTED RESULTS
As the local host only has IPv4, and the logs seems to show the IPv4 in the connection error, I would assume it should use that.
ACTUAL RESULTS
The command actually uses the IPv6 address after resolving the IPv4 address.
FINAL NOTES
I am new to Ansible, sorry if I am missing something obvious.