-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
synchronize refers exclusively to deprecated 'ansible_ssh_user' #60
Comments
The code on this was bugging me and I woke up with a thought on this. Could this be changed from:
To:
The key pieces being to check for 'ansible_user' in preference to 'ansible_ssh_user'. |
I'd like to contribute a PR to fix this - I have attempted to run "ansible-test" using the following:
Unfortunately that seems to fail.
The general error on these is along the lines of:
Can you advise on how to run the unit tests prior to beginning dev work on this? |
Disregard previous comment - I had the project checkout on disk as |
Documentation doesn't refer to
This is also the case for |
resolved_by_pr #159 |
From @djgraff209 on Jun 23, 2020 22:12
SUMMARY
The Ansible 'synchronize' refers to the deprecated 'ansible_ssh_user' variable exclusively without taking into account the 'ansible_user' (2.9+) variable.
ISSUE TYPE
COMPONENT NAME
synchronize
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Controller: MacOS Catalina 10.15.5 / Python3 3.8.2
Target Node Set:
8 nodes running Redhat 7.7
1 node running CentOS 7.7
STEPS TO REPRODUCE
Assume following:
Provide a playbook to synchronize between a RedHat and CentOS
EXPECTED RESULTS
Expect that synchronize plugin will copy redhat@host1:/some/directory/somefile.tar.gz to centos@host2:/tmp/somefile.tar.gz using rsync command delegated to host1.
ACTUAL RESULTS
Task fails to copy indicating too many authentication attempts.
NB - I updated my inventory adding
ansible_ssh_user
to matchansible_user
on host2 and the operation succeededDigging through the source
https://github.com/ansible/ansible/blob/stable-2.9/lib/ansible/plugins/action/synchronize.py#L320
This section appears to need some care & feeding to consider
ansible_user
Copied from original issue: ansible/ansible#70248
The text was updated successfully, but these errors were encountered: