put full dir in file declaration

This commit is contained in:
Cedric Girard 2018-07-27 11:24:52 +02:00
parent 7b27425a89
commit ead97e5fbf
3 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
- name: "Copy two files from {{ dir_src }} to {{ dir_dst }}"
copy:
src: "{{dir_src}}/{{item}}"
src: "{{item}}"
dest: "{{dir_dst}}/"
loop:
- "{{file01}}"

View File

@ -1,6 +1,6 @@
- name: "delete two files in {{ dir_dst }}"
file:
path: "{{dir_dst}}/{{item}}"
path: "{{item}}"
state: absent
loop:
- "{{file01}}"

View File

@ -1,4 +1,4 @@
dir_src: ~/Images
dir_dst: /tmp/images
dir_src: /tmp/bar
dir_dst: /tmp/foo
file01: "{{ playbook_dir }}/files/file01.txt"
file02: "{{ playbook_dir }}/files/file02.txt"