mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-11 15:15:26 +01:00
Compare commits
6 commits
965e808389
...
fe5ca0194e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe5ca0194e | ||
|
|
93cd49adba | ||
|
|
0131563ca4 | ||
|
|
dda97be28a | ||
|
|
94089b00f7 | ||
|
|
3cbaff144c |
4 changed files with 16 additions and 12 deletions
|
|
@ -1,6 +1,8 @@
|
||||||
---
|
---
|
||||||
bugfixes:
|
minor_changes:
|
||||||
- synchronize - fix deprecated ``ansible.module_utils._text`` and ``ansible.module_utils.common._collections_compat`` imports (https://github.com/ansible-collections/ansible.posix/issues/686).
|
- plugins/action/synchronize.py - fix deprecated ``ansible.module_utils._text`` and ``ansible.module_utils.common._collections_compat`` imports (https://github.com/ansible-collections/ansible.posix/issues/686).
|
||||||
- synchronize - fix deprecated ``ansible.module_utils.six`` imports for CI compliance.
|
- plugins/action/synchronize.py - fix deprecated ``ansible.module_utils.six`` imports for CI compliance.
|
||||||
|
- plugins/modules/synchronize.py - fix deprecated ``ansible.module_utils._text`` import (https://github.com/ansible-collections/ansible.posix/issues/686).
|
||||||
|
- plugins/modules/synchronize.py - fix deprecated ``ansible.module_utils.six`` imports for CI compliance.
|
||||||
- mount - fix deprecated ``ansible.module_utils._text`` import (https://github.com/ansible-collections/ansible.posix/issues/686).
|
- mount - fix deprecated ``ansible.module_utils._text`` import (https://github.com/ansible-collections/ansible.posix/issues/686).
|
||||||
- mount - fix deprecated ``ansible.module_utils.six`` imports for CI compliance.
|
- mount - fix deprecated ``ansible.module_utils.six`` imports for CI compliance.
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,8 @@ from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
import os.path
|
import os.path
|
||||||
|
import shlex
|
||||||
from collections.abc import MutableSequence
|
from collections.abc import MutableSequence
|
||||||
from shlex import quote as shlex_quote
|
|
||||||
|
|
||||||
from ansible import constants as C
|
from ansible import constants as C
|
||||||
from ansible.module_utils.common.text.converters import to_text
|
from ansible.module_utils.common.text.converters import to_text
|
||||||
|
|
@ -427,13 +427,13 @@ class ActionModule(ActionBase):
|
||||||
|
|
||||||
if self._remote_transport in DOCKER + PODMAN:
|
if self._remote_transport in DOCKER + PODMAN:
|
||||||
if become and self._play_context.become_user:
|
if become and self._play_context.become_user:
|
||||||
_tmp_args['rsync_opts'].append('--rsh=' + shlex_quote('%s exec -u %s -i' % (self._docker_cmd, self._play_context.become_user)))
|
_tmp_args['rsync_opts'].append('--rsh=' + shlex.quote('%s exec -u %s -i' % (self._docker_cmd, self._play_context.become_user)))
|
||||||
elif user is not None:
|
elif user is not None:
|
||||||
_tmp_args['rsync_opts'].append('--rsh=' + shlex_quote('%s exec -u %s -i' % (self._docker_cmd, user)))
|
_tmp_args['rsync_opts'].append('--rsh=' + shlex.quote('%s exec -u %s -i' % (self._docker_cmd, user)))
|
||||||
else:
|
else:
|
||||||
_tmp_args['rsync_opts'].append('--rsh=' + shlex_quote('%s exec -i' % self._docker_cmd))
|
_tmp_args['rsync_opts'].append('--rsh=' + shlex.quote('%s exec -i' % self._docker_cmd))
|
||||||
elif self._remote_transport in BUILDAH:
|
elif self._remote_transport in BUILDAH:
|
||||||
_tmp_args['rsync_opts'].append('--rsh=' + shlex_quote('buildah run --'))
|
_tmp_args['rsync_opts'].append('--rsh=' + shlex.quote('buildah run --'))
|
||||||
|
|
||||||
# run the module and store the result
|
# run the module and store the result
|
||||||
result.update(self._execute_module('ansible.posix.synchronize', module_args=_tmp_args, task_vars=task_vars))
|
result.update(self._execute_module('ansible.posix.synchronize', module_args=_tmp_args, task_vars=task_vars))
|
||||||
|
|
|
||||||
|
|
@ -367,9 +367,13 @@ EXAMPLES = r'''
|
||||||
import os
|
import os
|
||||||
import errno
|
import errno
|
||||||
|
|
||||||
|
try:
|
||||||
|
from shlex import quote as shlex_quote
|
||||||
|
except ImportError:
|
||||||
|
from pipes import quote as shlex_quote
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible.module_utils._text import to_bytes, to_native
|
from ansible.module_utils.common.text.converters import to_bytes, to_native
|
||||||
from ansible.module_utils.six.moves import shlex_quote
|
|
||||||
|
|
||||||
|
|
||||||
client_addr = None
|
client_addr = None
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
tests/utils/shippable/timing.py shebang
|
tests/utils/shippable/timing.py shebang
|
||||||
plugins/action/synchronize.py pylint:ansible-bad-import-from
|
|
||||||
plugins/callback/cgroup_perf_recap.py pylint:ansible-bad-import-from
|
plugins/callback/cgroup_perf_recap.py pylint:ansible-bad-import-from
|
||||||
plugins/modules/mount.py pylint:ansible-bad-import-from
|
|
||||||
plugins/modules/sysctl.py pylint:ansible-bad-import-from
|
plugins/modules/sysctl.py pylint:ansible-bad-import-from
|
||||||
plugins/shell/csh.py pylint:ansible-bad-import-from
|
plugins/shell/csh.py pylint:ansible-bad-import-from
|
||||||
plugins/shell/fish.py pylint:ansible-bad-import-from
|
plugins/shell/fish.py pylint:ansible-bad-import-from
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue