mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-10 22:55:27 +01:00
Adding tests, corrections
This commit is contained in:
parent
6afd4cdcf1
commit
e72424ae50
4 changed files with 28 additions and 3 deletions
|
|
@ -1,2 +1,2 @@
|
|||
minor_changes:
|
||||
- synchronize - add the ``quiet`` option to supress non-error messages (https://github.com/ansible-collections/ansible.posix/issues/171).
|
||||
- synchronize - add the ``quiet`` option to suppress non-error messages (https://github.com/ansible-collections/ansible.posix/issues/171).
|
||||
|
|
|
|||
|
|
@ -450,7 +450,7 @@ def main():
|
|||
mode=dict(type='str', default='push', choices=['pull', 'push']),
|
||||
link_dest=dict(type='list', elements='path'),
|
||||
link_dest=dict(type='list', elements='str'),
|
||||
quiet=dict(type='bool',default=False)
|
||||
quiet=dict(type='bool', default=False)
|
||||
),
|
||||
supports_check_mode=True,
|
||||
)
|
||||
|
|
@ -617,7 +617,7 @@ def main():
|
|||
cmd.append(shlex_quote(source))
|
||||
cmd.append(shlex_quote(dest))
|
||||
if quiet:
|
||||
cmd.append('--quiet')
|
||||
cmd.append('--quiet')
|
||||
|
||||
cmdstr = ' '.join(cmd)
|
||||
|
||||
|
|
|
|||
2
tests/integration/inventory
Normal file
2
tests/integration/inventory
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
[testgroup]
|
||||
testhost ansible_connection="local" ansible_pipelining="yes" ansible_python_interpreter="/Users/mandkulk/venv3.9/bin/python"
|
||||
|
|
@ -342,9 +342,32 @@
|
|||
- name: Cleanup
|
||||
ansible.builtin.file:
|
||||
state: absent
|
||||
<<<<<<< HEAD
|
||||
path: "{{ output_dir }}/{{ item }}"
|
||||
loop:
|
||||
- directory b/foo.txt
|
||||
- directory a/foo.txt
|
||||
- directory a
|
||||
- directory b
|
||||
=======
|
||||
path: '{{output_dir}}/{{item}}'
|
||||
with_items:
|
||||
- foo.result
|
||||
- bar.result
|
||||
- name: synchronize files without quiet option
|
||||
synchronize:
|
||||
src: '{{output_dir}}/foo.txt'
|
||||
dest: '{{output_dir}}/foo.result'
|
||||
register: sync_result
|
||||
ignore_errors: true
|
||||
- assert:
|
||||
that:
|
||||
- '''--quiet'' not in sync_result.cmd'
|
||||
- name: Cleanup
|
||||
file:
|
||||
state: absent
|
||||
path: '{{output_dir}}/{{item}}'
|
||||
with_items:
|
||||
- foo.result
|
||||
- bar.result
|
||||
>>>>>>> 9dbedb6 (Adding tests, corrections)
|
||||
|
|
|
|||
Loading…
Reference in a new issue