mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-11 23:25:28 +01:00
Check OS distribution before synchronize instegration test task
Signed-off-by: Hideki Saito <saito@fgrep.org>
This commit is contained in:
parent
6a5040cb76
commit
fc58c51fba
1 changed files with 26 additions and 26 deletions
|
|
@ -23,32 +23,32 @@
|
|||
debug:
|
||||
msg: "{{ ansible_distribution }}"
|
||||
|
||||
#- name: synchronize file to new filename
|
||||
# synchronize:
|
||||
# src: '{{output_dir}}/foo.txt'
|
||||
# dest: '{{output_dir}}/foo.result'
|
||||
# register: sync_result
|
||||
# delegate_to: '{{ inventory_hostname }}'
|
||||
#- assert:
|
||||
# that:
|
||||
# - '''changed'' in sync_result'
|
||||
# - sync_result.changed == true
|
||||
# - '''cmd'' in sync_result'
|
||||
# - '''rsync'' in sync_result.cmd'
|
||||
# - '''msg'' in sync_result'
|
||||
# - sync_result.msg.startswith('>f+')
|
||||
# - 'sync_result.msg.endswith(''+ foo.txt
|
||||
#
|
||||
# '')'
|
||||
#- name: test that the file was really copied over
|
||||
# stat:
|
||||
# path: '{{ output_dir }}/foo.result'
|
||||
# register: stat_result
|
||||
#- assert:
|
||||
# that:
|
||||
# - stat_result.stat.exists == True
|
||||
# - stat_result.stat.checksum == '2aae6c35c94fcfb415dbe95f408b9ce91ee846ed'
|
||||
#
|
||||
- name: synchronize file to new filename
|
||||
synchronize:
|
||||
src: '{{output_dir}}/foo.txt'
|
||||
dest: '{{output_dir}}/foo.result'
|
||||
register: sync_result
|
||||
#delegate_to: '{{ inventory_hostname }}'
|
||||
- assert:
|
||||
that:
|
||||
- '''changed'' in sync_result'
|
||||
- sync_result.changed == true
|
||||
- '''cmd'' in sync_result'
|
||||
- '''rsync'' in sync_result.cmd'
|
||||
- '''msg'' in sync_result'
|
||||
- sync_result.msg.startswith('>f+')
|
||||
- 'sync_result.msg.endswith(''+ foo.txt
|
||||
|
||||
'')'
|
||||
- name: test that the file was really copied over
|
||||
stat:
|
||||
path: '{{ output_dir }}/foo.result'
|
||||
register: stat_result
|
||||
- assert:
|
||||
that:
|
||||
- stat_result.stat.exists == True
|
||||
- stat_result.stat.checksum == '2aae6c35c94fcfb415dbe95f408b9ce91ee846ed'
|
||||
|
||||
#- name: test that the file is not copied a second time
|
||||
# synchronize:
|
||||
# src='{{output_dir}}/foo.txt'
|
||||
|
|
|
|||
Loading…
Reference in a new issue