mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-14 00:25:20 +01:00
Compare commits
1 commit
9132ffaf81
...
422f0611d4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
422f0611d4 |
6 changed files with 38 additions and 5 deletions
|
|
@ -171,7 +171,7 @@ options:
|
||||||
- Add a destination to hard link against during the rsync.
|
- Add a destination to hard link against during the rsync.
|
||||||
type: list
|
type: list
|
||||||
default:
|
default:
|
||||||
elements: path
|
elements: str
|
||||||
delay_updates:
|
delay_updates:
|
||||||
description:
|
description:
|
||||||
- This option puts the temporary file from each updated file into a holding directory until the end of the transfer,
|
- This option puts the temporary file from each updated file into a holding directory until the end of the transfer,
|
||||||
|
|
@ -388,8 +388,8 @@ def is_rsh_needed(source, dest):
|
||||||
def main():
|
def main():
|
||||||
module = AnsibleModule(
|
module = AnsibleModule(
|
||||||
argument_spec=dict(
|
argument_spec=dict(
|
||||||
src=dict(type='path', required=True),
|
src=dict(type='str', required=True),
|
||||||
dest=dict(type='path', required=True),
|
dest=dict(type='str', required=True),
|
||||||
dest_port=dict(type='int'),
|
dest_port=dict(type='int'),
|
||||||
delete=dict(type='bool', default=False),
|
delete=dict(type='bool', default=False),
|
||||||
private_key=dict(type='path'),
|
private_key=dict(type='path'),
|
||||||
|
|
@ -418,7 +418,7 @@ def main():
|
||||||
verify_host=dict(type='bool', default=False),
|
verify_host=dict(type='bool', default=False),
|
||||||
delay_updates=dict(type='bool', default=True),
|
delay_updates=dict(type='bool', default=True),
|
||||||
mode=dict(type='str', default='push', choices=['pull', 'push']),
|
mode=dict(type='str', default='push', choices=['pull', 'push']),
|
||||||
link_dest=dict(type='list', elements='path'),
|
link_dest=dict(type='list', elements='str'),
|
||||||
),
|
),
|
||||||
supports_check_mode=True,
|
supports_check_mode=True,
|
||||||
)
|
)
|
||||||
|
|
@ -572,7 +572,7 @@ def main():
|
||||||
# hardlink is actually a change
|
# hardlink is actually a change
|
||||||
cmd.append('-vv')
|
cmd.append('-vv')
|
||||||
for x in link_dest:
|
for x in link_dest:
|
||||||
link_path = os.path.abspath(x)
|
link_path = os.path.abspath(os.path.expanduser(x))
|
||||||
destination_path = os.path.abspath(os.path.dirname(dest))
|
destination_path = os.path.abspath(os.path.dirname(dest))
|
||||||
if destination_path.find(link_path) == 0:
|
if destination_path.find(link_path) == 0:
|
||||||
module.fail_json(msg='Hardlinking into a subdirectory of the source would cause recursion. %s and %s' % (destination_path, dest))
|
module.fail_json(msg='Hardlinking into a subdirectory of the source would cause recursion. %s and %s' % (destination_path, dest))
|
||||||
|
|
@ -581,6 +581,12 @@ def main():
|
||||||
changed_marker = '<<CHANGED>>'
|
changed_marker = '<<CHANGED>>'
|
||||||
cmd.append('--out-format=%s' % shlex_quote(changed_marker + '%i %n%L'))
|
cmd.append('--out-format=%s' % shlex_quote(changed_marker + '%i %n%L'))
|
||||||
|
|
||||||
|
# expand the paths
|
||||||
|
if '@' not in source:
|
||||||
|
source = os.path.expanduser(source)
|
||||||
|
if '@' not in dest:
|
||||||
|
dest = os.path.expanduser(dest)
|
||||||
|
|
||||||
cmd.append(shlex_quote(source))
|
cmd.append(shlex_quote(source))
|
||||||
cmd.append(shlex_quote(dest))
|
cmd.append(shlex_quote(dest))
|
||||||
cmdstr = ' '.join(cmd)
|
cmdstr = ' '.join(cmd)
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,7 @@
|
||||||
|
plugins/modules/synchronize.py use-argspec-type-path
|
||||||
|
plugins/modules/synchronize.py validate-modules:doc-default-does-not-match-spec
|
||||||
|
plugins/modules/synchronize.py validate-modules:nonexistent-parameter-documented
|
||||||
|
plugins/modules/synchronize.py validate-modules:parameter-type-not-in-doc
|
||||||
|
plugins/modules/synchronize.py validate-modules:undocumented-parameter
|
||||||
tests/utils/shippable/check_matrix.py replace-urlopen
|
tests/utils/shippable/check_matrix.py replace-urlopen
|
||||||
tests/utils/shippable/timing.py shebang
|
tests/utils/shippable/timing.py shebang
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,7 @@
|
||||||
|
plugins/modules/synchronize.py use-argspec-type-path
|
||||||
|
plugins/modules/synchronize.py validate-modules:doc-default-does-not-match-spec
|
||||||
|
plugins/modules/synchronize.py validate-modules:nonexistent-parameter-documented
|
||||||
|
plugins/modules/synchronize.py validate-modules:parameter-type-not-in-doc
|
||||||
|
plugins/modules/synchronize.py validate-modules:undocumented-parameter
|
||||||
tests/utils/shippable/check_matrix.py replace-urlopen
|
tests/utils/shippable/check_matrix.py replace-urlopen
|
||||||
tests/utils/shippable/timing.py shebang
|
tests/utils/shippable/timing.py shebang
|
||||||
|
|
|
||||||
|
|
@ -1 +1,6 @@
|
||||||
|
plugins/modules/synchronize.py use-argspec-type-path
|
||||||
|
plugins/modules/synchronize.py validate-modules:doc-default-does-not-match-spec
|
||||||
|
plugins/modules/synchronize.py validate-modules:nonexistent-parameter-documented
|
||||||
|
plugins/modules/synchronize.py validate-modules:parameter-type-not-in-doc
|
||||||
|
plugins/modules/synchronize.py validate-modules:undocumented-parameter
|
||||||
tests/utils/shippable/timing.py shebang
|
tests/utils/shippable/timing.py shebang
|
||||||
|
|
|
||||||
|
|
@ -1 +1,6 @@
|
||||||
|
plugins/modules/synchronize.py use-argspec-type-path
|
||||||
|
plugins/modules/synchronize.py validate-modules:doc-default-does-not-match-spec
|
||||||
|
plugins/modules/synchronize.py validate-modules:nonexistent-parameter-documented
|
||||||
|
plugins/modules/synchronize.py validate-modules:parameter-type-not-in-doc
|
||||||
|
plugins/modules/synchronize.py validate-modules:undocumented-parameter
|
||||||
tests/utils/shippable/timing.py shebang
|
tests/utils/shippable/timing.py shebang
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,9 @@
|
||||||
|
plugins/modules/synchronize.py pylint:disallowed-name
|
||||||
|
plugins/modules/synchronize.py pylint:blacklisted-name
|
||||||
|
plugins/modules/synchronize.py use-argspec-type-path
|
||||||
|
plugins/modules/synchronize.py validate-modules:doc-default-does-not-match-spec
|
||||||
|
plugins/modules/synchronize.py validate-modules:nonexistent-parameter-documented
|
||||||
|
plugins/modules/synchronize.py validate-modules:parameter-type-not-in-doc
|
||||||
|
plugins/modules/synchronize.py validate-modules:undocumented-parameter
|
||||||
tests/utils/shippable/check_matrix.py replace-urlopen
|
tests/utils/shippable/check_matrix.py replace-urlopen
|
||||||
tests/utils/shippable/timing.py shebang
|
tests/utils/shippable/timing.py shebang
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue