mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-12 07:35:31 +01:00
Modifying based on feedback
This commit is contained in:
commit
fd4e362d16
3 changed files with 35 additions and 2 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 output messages (https://github.com/ansible-collections/ansible.posix/issues/171).
|
||||
|
|
|
|||
|
|
@ -429,7 +429,7 @@ def main():
|
|||
delay_updates=dict(type='bool', default=True),
|
||||
mode=dict(type='str', default='push', choices=['pull', 'push']),
|
||||
link_dest=dict(type='list', elements='str'),
|
||||
quiet=dict(type='bool',default=False)
|
||||
quiet=dict(type='bool', default=False)
|
||||
),
|
||||
supports_check_mode=True,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -227,3 +227,36 @@
|
|||
- directory_a/foo.txt
|
||||
- directory_a
|
||||
- directory_b
|
||||
- name: synchronize files with quiet option
|
||||
synchronize:
|
||||
src: '{{output_dir}}/foo.txt'
|
||||
dest: '{{output_dir}}/foo.result'
|
||||
quiet: true
|
||||
register: sync_result
|
||||
ignore_errors: true
|
||||
- assert:
|
||||
that:
|
||||
- '''--quiet'' in sync_result.cmd'
|
||||
- name: Cleanup
|
||||
file:
|
||||
state: absent
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue