Commit graph

22 commits

Author SHA1 Message Date
Axionize
9d4f2c56cb
Merge 6e7c537956 into 9343c6f56f 2025-10-21 14:01:15 +02:00
softwarefactory-project-zuul[bot]
0ed72d0004
Merge pull request #361 from k3it/main
maintain proper formating of the remote paths when defined as user@ho…

…st:/... or host:/...
SUMMARY

update  _format_rsync_rsh_target for proper handling of remote rsh/ssh paths.  fixes #360

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

ansible.posix.synchronize

Reviewed-by: Adam Miller <admiller@redhat.com>
Reviewed-by: Hideki Saito <saito@fgrep.org>
2024-09-09 09:39:57 +00:00
k3it
4efdb43ccd
maintain proper formating of the remote paths when defined as user@host:/... or host:/...
* fixes #360
2024-09-09 18:08:27 +09:00
Sloane Hertel
e929aad539
remove deprecated internal argument from synchronize (#421)
* remove deprecated internal argument from synchronize

the new_stdin argument is no longer used to instantiate a connection plugin

* add a changelog
2024-01-11 14:24:45 -06:00
Axionize
d0ea1143ee Make synchronize work with multiple src paths 2023-12-25 00:54:16 -05:00
Adam Miller
a85f736f6a refactor to comply with current ansible-lint and sanity guidelines
Signed-off-by: Adam Miller <admiller@redhat.com>
2023-12-06 17:22:59 -06:00
Juan Antonio Valino Garcia
50f87b0d15 move plugin to correct dir 2022-10-07 18:30:49 +02:00
Juan Antonio Valino Garcia
139e103b0f Fixes ##390. Hosts involved must have same password 2022-10-07 17:20:20 +02:00
Abhijeet Kasurde
a65807edc3
synchronize: Use SSH args from SSH connection plugins (#223)
SSH configuration migrated from Ansible configuration to
SSH connection configuration. Make ``synchronize`` understand
this.

Fixes: #222

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-08-11 10:45:52 +05:30
Tadej Borovšak
db12a40a4c Synchronize: properly quote shell command components
The synchronize action plugin and module were a bit sloppy when it
came to the command-line parameter quoting and that caused failuer on
some systems (for example, on Fedora 34).

This commit makes sure any argumnts with potentially problematic
characters are quoted before being used.
2021-08-04 13:37:18 +02:00
Sagi Shnaidman
133ffe51fb Complete adding podman connection to synchronize 2021-08-03 15:44:00 +03:00
Sagi Shnaidman
c5d49b2a91 Allow podman connections in synchronize module 2021-07-23 14:29:02 +03:00
ansible-zuul[bot]
f6fa00bfff
Merge pull request #187 from smemsh/fix-synchronize-become-user
synchronize: fix to honor become_user when become_method sudo

SUMMARY

When become_method is sudo, the synchronize module ignores become_user, always running as root.  This means one cannot create files as a target user, when they need to get in via a third user and can only sudo via that one.  In my case, I'm connecting via a special provisioning user that has sudo privs, but I need to create the files as the become_user.  I'm using it to deposit skeleton files, and there should be no reason to run another task with chown; after all, the documentation already describes the desired behavior:

The user and permissions for the synchronize dest are those of the remote_user on the destination host or the become_user if become=yes is active.

This patch takes the running become_user (if it's not None) and adds it to the sudo command with the -u command line option, so the file gets created correctly.  I have tested this and it works.
Other become_methods are ignored, but they already were anyways (the code already has a TODO to add other methods, which we don't attempt in this patch)
Fixes #186

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

synchronize
ADDITIONAL INFORMATION


See reproduction in #186.
This appears to have been in place since ansible/ansible@811a906

Reviewed-by: Amin Vakil <info@aminvakil.com>
Reviewed-by: Sumit Jaiswal <sjaiswal@redhat.com>
2021-07-08 14:16:12 +00:00
Scott Mcdermott
6b41ce1a9d Fix to honor become_user in synchronize module (Fixes #186) 2021-05-12 01:00:17 -07:00
quidame
d976add5da replace no more supported 'ansible_ssh_*' option names by the new ones
* Replace 'ansible_ssh_user' by 'ansible_user' everywhere.
* Replace 'ansible_ssh_port' by 'ansible_port' everywhere.
* Replace 'ansible_ssh_host' by 'ansible_host' everywhere.
2021-03-28 13:50:49 +02:00
ansible-zuul[bot]
bc88258687
Merge pull request #118 from pneerincx/bugfix_for_17492
Bugfix for #17492 "Do not prepend PWD when path is in form user@server:path or server:path" 

Reviewed-by: https://github.com/apps/ansible-zuul
2021-03-05 18:26:53 +00:00
Tadej Borovšak
98c86c54cd Inform synchronize module about community.docker collection
The synchronize action plugin has a built-in list of connection
plugins that it knows how to handle.

One of those connection plugins is the docker connection plugin. And
because the docker content has been moved around quite a lot, the
docker connection plugin has quite a few names:

 - docker in Ansible 2.9,
 - community.general.docker for community.general < 2.0.0, and
 - community.docker.docker since a few months ago.

And while the synchronize module already knew about the first two
names, the last one was still missing. This commit fixes that omission
and adds a third name into the mix.
2021-03-05 16:42:43 +01:00
pneerincx
931326fb70 Bugfix for #17492. 2020-12-09 18:19:32 +01:00
vishwas
4b0b50439d Fix for private_key overriding in synchronize module 2020-09-04 04:16:43 -04:00
Chris Church
32350028b6
Fix synchronize to work with renamed docker (and buildah) connection plugins. 2020-07-27 00:06:52 -04:00
Adam Miller
492d5e3d05 use FQCN for module call in action plugins
Fixes https://github.com/ansible-collections/ansible.posix/issues/11

Signed-off-by: Adam Miller <admiller@redhat.com>
2020-06-19 15:22:34 -05:00
Ansible Core Team
6f928621f0 Initial commit 2020-03-09 13:15:28 +00:00