mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-11 07:05:27 +01:00
Modify based on feedback
This commit is contained in:
parent
41bbe0dcbd
commit
7af8b05105
2 changed files with 8 additions and 8 deletions
|
|
@ -641,7 +641,7 @@ def main():
|
|||
result = dict(changed=changed, rc=rc, cmd=cmdstr, stdout_lines=out_lines, msg=out_clean)
|
||||
|
||||
if quiet:
|
||||
changes = len(out_lines) - 1 if len(out_lines) >= 1 else 0
|
||||
changes = out.count(changed_marker) if changed else 0
|
||||
result['msg'] = "%s files/directories have been synchronized" % changes
|
||||
|
||||
if module._diff:
|
||||
|
|
|
|||
|
|
@ -267,8 +267,8 @@
|
|||
- directory_b
|
||||
- name: synchronize files with quiet option
|
||||
synchronize:
|
||||
src: '{{output_dir}}/foo.txt'
|
||||
dest: '{{output_dir}}/foo.result'
|
||||
src: '{{ output_dir }}/foo.txt'
|
||||
dest: '{{ output_dir }}/foo.result'
|
||||
quiet: true
|
||||
register: sync_result
|
||||
ignore_errors: true
|
||||
|
|
@ -278,14 +278,14 @@
|
|||
- name: Cleanup
|
||||
file:
|
||||
state: absent
|
||||
path: '{{output_dir}}/{{item}}'
|
||||
with_items:
|
||||
path: '{{ output_dir }}/{{ item }}'
|
||||
loop:
|
||||
- foo.result
|
||||
- bar.result
|
||||
- name: synchronize files without quiet option
|
||||
synchronize:
|
||||
src: '{{output_dir}}/foo.txt'
|
||||
dest: '{{output_dir}}/foo.result'
|
||||
src: '{{ output_dir }}/foo.txt'
|
||||
dest: '{{ output_dir }}/foo.result'
|
||||
register: sync_result
|
||||
ignore_errors: true
|
||||
- assert:
|
||||
|
|
@ -294,7 +294,7 @@
|
|||
- name: Cleanup
|
||||
file:
|
||||
state: absent
|
||||
path: '{{output_dir}}/{{item}}'
|
||||
path: '{{ output_dir }}/{{ item }}'
|
||||
with_items:
|
||||
- foo.result
|
||||
- bar.result
|
||||
|
|
|
|||
Loading…
Reference in a new issue