mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-12 07:35:31 +01:00
Add delegate_to to each task
Signed-off-by: Hideki Saito <saito@fgrep.org>
This commit is contained in:
parent
d1814d1d4a
commit
42f5d30ab0
1 changed files with 3 additions and 0 deletions
|
|
@ -6,10 +6,12 @@
|
||||||
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}}'
|
||||||
|
|
@ -18,6 +20,7 @@
|
||||||
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:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue