-
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
Whitespace in fully path to playbook causes rsync to fail #278
Whitespace in fully path to playbook causes rsync to fail #278
Conversation
@asnaedae Hi! thank you for the PR!
In this case, you need to create a changelog fragments file under changelogs/fragments directory according to the following document:
Therefore, is it possible to create and add a fragments file and push those changes again? |
8728c16
to
9374995
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! thanks for the PR!
I have left one change request regarding dest
path handling. Also if it is possible, can you add some integration tests for source
and dest
handling with whitespaces in the full path?
…uses rsync to incorrectly chdir to current source dir, Example : cd "/home/a/ansible plays" task: - synchronize: src: a dest: b Results in the following error being thrown fatal: [remote-host]: FAILED! => {"changed": false, "cmd": "/usr/bin/rsync --delay-updates -F --compress --archive --rsh='/usr/bin/ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' --rsync-path='sudo -u root rsync' --out-format='<<CHANGED>>%i %n%L' /home/a/ansible plays/deployments// remote-user@remote-host:/data/", "msg": "rsync: [sender] link_stat \"/home/a/ansible\" failed: No such file or directory (2)\nrsync: [sender] change_dir \"/home/a/ansible plays/plays/a/\" failed: No such file or directory (2)\nrsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1330) [sender=3.2.3]\n", "rc": 23}
9374995
to
d1be551
Compare
Thanks for the feedback @saito-hideki , I should have added tests and read the background docs before hitting the code, have added a test to cover both situations, and correctly asserts. Do let me know if there's any further changes to be made thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! thanks :)
@Akasurde if it is possible, can you review this pull request? As far as I can see, this PR looks reasonable for me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Closing and re-opening for CI trigger |
I know this is old but… I only updated my playbook now (bye bye CentOS), and it breaks my synchronize usage, with multiple sources. Now, I have to loop over, but there is I'll see if I have a workaround… EDIT: I see this is addressed by #519 |
Any whitespace in path to playbook directory causes rsync to incorrectly chdir fail to correctly run.
SUMMARY
Any whitespace in path to playbook directory causes rsync to incorrectly chdir fail to correctly run.
ISSUE TYPE
COMPONENT NAME
ansible.posix.synchronize
ADDITIONAL INFORMATION
Example :
Results in the following error being thrown