mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-12 15:45:20 +01:00
TEST
This commit is contained in:
parent
6dbe55534a
commit
4ed7a677ce
1 changed files with 24 additions and 16 deletions
|
|
@ -31,25 +31,33 @@
|
||||||
debug:
|
debug:
|
||||||
msg: "{{ output_dir }}"
|
msg: "{{ output_dir }}"
|
||||||
|
|
||||||
- name: test that the file was really copied over
|
- block:
|
||||||
stat:
|
- name: test that the file was really copied over
|
||||||
path: "{{ output_dir }}/{{item}}"
|
stat:
|
||||||
with_items:
|
path: "{{ output_dir }}/{{item}}"
|
||||||
- foo.txt
|
with_items:
|
||||||
- bar.txt
|
- foo.txt
|
||||||
|
- bar.txt
|
||||||
- name: copy file to new filename
|
- name: copy file to new filename
|
||||||
copy:
|
copy:
|
||||||
src: "{{ output_dir }}/foo.txt"
|
src: "{{ output_dir }}/foo.txt"
|
||||||
dest: "{{ output_dir }}/foo.result"
|
dest: "{{ output_dir }}/foo.result"
|
||||||
when:
|
when:
|
||||||
- ansible_facts.virtualization_type != 'docker'
|
- ansible_facts.virtualization_type != 'docker'
|
||||||
|
|
||||||
- name: copy file to new filename
|
- block:
|
||||||
copy:
|
- name: test that the file was really copied over
|
||||||
src: "{{ output_dir }}/foo.txt"
|
stat:
|
||||||
dest: "{{ output_dir }}/foo.result"
|
path: "{{ output_dir }}/{{item}}"
|
||||||
delegate_to: "{{ inventory_hostname }}"
|
with_items:
|
||||||
|
- foo.txt
|
||||||
|
- bar.txt
|
||||||
|
delegate_to: "{{ inventory_hostname }}"
|
||||||
|
- name: copy file to new filename
|
||||||
|
copy:
|
||||||
|
src: "{{ output_dir }}/foo.txt"
|
||||||
|
dest: "{{ output_dir }}/foo.result"
|
||||||
|
delegate_to: "{{ inventory_hostname }}"
|
||||||
when:
|
when:
|
||||||
- ansible_facts.virtualization_type == 'docker'
|
- ansible_facts.virtualization_type == 'docker'
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue