mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-12 07:35:31 +01:00
Adding tests, corrections
This commit is contained in:
parent
8ceac49534
commit
39930cac21
3 changed files with 37 additions and 4 deletions
|
|
@ -1,2 +1,2 @@
|
||||||
minor_changes:
|
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).
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,7 @@ options:
|
||||||
version_added: '1.3.0'
|
version_added: '1.3.0'
|
||||||
quiet:
|
quiet:
|
||||||
description:
|
description:
|
||||||
- This specifies rsync quiet option which on yes/true suppresses the non-error messages
|
- This specifies rsync quiet option which on yes/true suppresses the non-error messages.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: no
|
||||||
version_added: '1.3.0'
|
version_added: '1.3.0'
|
||||||
|
|
|
||||||
|
|
@ -227,3 +227,36 @@
|
||||||
- directory_a/foo.txt
|
- directory_a/foo.txt
|
||||||
- directory_a
|
- directory_a
|
||||||
- directory_b
|
- 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