mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-12 07:35:31 +01:00
TEST
This commit is contained in:
parent
3a26827e27
commit
a65c4f15ec
1 changed files with 30 additions and 30 deletions
|
|
@ -23,32 +23,6 @@
|
||||||
debug:
|
debug:
|
||||||
msg: "{{ output_dir }}"
|
msg: "{{ output_dir }}"
|
||||||
|
|
||||||
#- block:
|
|
||||||
# - name: test that the file was really copied over
|
|
||||||
# stat:
|
|
||||||
# path: "{{ output_dir }}/{{item}}"
|
|
||||||
# with_items:
|
|
||||||
# - foo.txt
|
|
||||||
# - bar.txt
|
|
||||||
# - name: synchronize file to new filename
|
|
||||||
# synchronize:
|
|
||||||
# src: "{{ output_dir }}/foo.txt"
|
|
||||||
# dest: "{{ output_dir }}/foo.result"
|
|
||||||
# register: sync_result
|
|
||||||
# - 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
|
|
||||||
#
|
|
||||||
# '')'
|
|
||||||
# when:
|
|
||||||
# - ansible_facts.virtualization_type != 'docker'
|
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: test that the file was really copied over
|
- name: test that the file was really copied over
|
||||||
stat:
|
stat:
|
||||||
|
|
@ -56,13 +30,11 @@
|
||||||
with_items:
|
with_items:
|
||||||
- foo.txt
|
- foo.txt
|
||||||
- bar.txt
|
- bar.txt
|
||||||
delegate_to: "{{ inventory_hostname }}"
|
|
||||||
- name: synchronize file to new filename
|
- name: synchronize file to new filename
|
||||||
synchronize:
|
synchronize:
|
||||||
src: "{{ output_dir }}/foo.txt"
|
src: "{{ output_dir }}/foo.txt"
|
||||||
dest: "{{ output_dir }}/foo.result"
|
dest: "{{ output_dir }}/foo.result"
|
||||||
register: sync_result
|
register: sync_result
|
||||||
delegate_to: "{{ inventory_hostname }}"
|
|
||||||
- assert:
|
- assert:
|
||||||
that:
|
that:
|
||||||
- '''changed'' in sync_result'
|
- '''changed'' in sync_result'
|
||||||
|
|
@ -75,8 +47,36 @@
|
||||||
|
|
||||||
'')'
|
'')'
|
||||||
when:
|
when:
|
||||||
- ansible_facts.virtualization_type == 'docker'
|
- ansible_facts.virtualization_type != 'docker'
|
||||||
|
|
||||||
|
#- block:
|
||||||
|
# - name: test that the file was really copied over
|
||||||
|
# stat:
|
||||||
|
# path: "{{ output_dir }}/{{item}}"
|
||||||
|
# with_items:
|
||||||
|
# - foo.txt
|
||||||
|
# - bar.txt
|
||||||
|
# delegate_to: "{{ inventory_hostname }}"
|
||||||
|
# - 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
|
||||||
|
#
|
||||||
|
# '')'
|
||||||
|
# when:
|
||||||
|
# - ansible_facts.virtualization_type == 'docker'
|
||||||
|
#
|
||||||
#- name: synchronize file to new filename
|
#- name: synchronize file to new filename
|
||||||
# synchronize:
|
# synchronize:
|
||||||
# src: "{{ output_dir }}/foo.txt"
|
# src: "{{ output_dir }}/foo.txt"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue