mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-11 23:25:28 +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:
|
||||
path: '{{ output_dir }}'
|
||||
state: absent
|
||||
delegate_to: '{{ inventory_hostname }}'
|
||||
- name: Create the working directory
|
||||
file:
|
||||
path: '{{ output_dir }}'
|
||||
state: directory
|
||||
delegate_to: '{{ inventory_hostname }}'
|
||||
- name: create test new files
|
||||
copy:
|
||||
dest: '{{output_dir}}/{{item}}'
|
||||
|
|
@ -18,6 +20,7 @@
|
|||
with_items:
|
||||
- foo.txt
|
||||
- bar.txt
|
||||
delegate_to: '{{ inventory_hostname }}'
|
||||
|
||||
- name: Check OS distribution
|
||||
debug:
|
||||
|
|
|
|||
Loading…
Reference in a new issue