This commit is contained in:
Hideki Saito 2022-03-13 01:35:54 +09:00
parent 4ed7a677ce
commit f976c994c7

View file

@ -19,14 +19,6 @@
- foo.txt
- bar.txt
- name: Check facts
debug:
var: ansible_facts
- name: Check virtualization_type
debug:
msg: "{{ ansible_facts.virtualization_type }}"
- name: Check '{{ output_dir }}' value
debug:
msg: "{{ output_dir }}"
@ -53,11 +45,13 @@
- foo.txt
- bar.txt
delegate_to: "{{ inventory_hostname }}"
delegate_facts: true
- name: copy file to new filename
copy:
src: "{{ output_dir }}/foo.txt"
dest: "{{ output_dir }}/foo.result"
delegate_to: "{{ inventory_hostname }}"
delegate_facts: true
when:
- ansible_facts.virtualization_type == 'docker'