mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-11 23:25:28 +01:00
TEST
This commit is contained in:
parent
d9137b4248
commit
fdd8ae0ed3
1 changed files with 3 additions and 7 deletions
|
|
@ -6,12 +6,10 @@
|
||||||
file:
|
file:
|
||||||
path: '{{ output_dir }}'
|
path: '{{ output_dir }}'
|
||||||
state: absent
|
state: absent
|
||||||
delegate_to: '{{ inventory_hostname }}'
|
|
||||||
- name: Create the working directory
|
- name: Create the working directory
|
||||||
file:
|
file:
|
||||||
path: '{{ output_dir }}'
|
path: '{{ output_dir }}'
|
||||||
state: directory
|
state: directory
|
||||||
delegate_to: '{{ inventory_hostname }}'
|
|
||||||
- name: create test new files
|
- name: create test new files
|
||||||
copy:
|
copy:
|
||||||
dest: '{{output_dir}}/{{item}}'
|
dest: '{{output_dir}}/{{item}}'
|
||||||
|
|
@ -20,7 +18,6 @@
|
||||||
with_items:
|
with_items:
|
||||||
- foo.txt
|
- foo.txt
|
||||||
- bar.txt
|
- bar.txt
|
||||||
delegate_to: '{{ inventory_hostname }}'
|
|
||||||
|
|
||||||
- name: Check OS distribution
|
- name: Check OS distribution
|
||||||
debug:
|
debug:
|
||||||
|
|
@ -32,16 +29,15 @@
|
||||||
|
|
||||||
- name: test that the file was really copied over
|
- name: test that the file was really copied over
|
||||||
stat:
|
stat:
|
||||||
path: '{{output_dir}}/{{item}}'
|
path: "{{ output_dir }}/{{item}}"
|
||||||
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: /root/ansible_collections/ansible/posix/tests/output/.tmp/output_dir/foo.txt
|
src: "{{ output_dir }}/foo.txt"
|
||||||
dest: /root/ansible_collections/ansible/posix/tests/output/.tmp/output_dir/foo.result
|
dest: "{{ output_dir }}/foo.result"
|
||||||
register: sync_result
|
register: sync_result
|
||||||
delegate_to: '{{ inventory_hostname }}'
|
delegate_to: '{{ inventory_hostname }}'
|
||||||
#- assert:
|
#- assert:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue