Possible to use sub-directories in files

8 views
Skip to first unread message

j.barrett Strausser

unread,
Oct 2, 2015, 12:05:35 PM10/2/15
to Ansible Project
Is it possible to use subdirectories when copying files?

I have a play like

- name: Copy Migration Files
copy: src={{item}} dest=/opt/flyway/sql/
tags: migrate
with_items:
- V1_1__SetupSchemas.sql

Right now the V1_1__SetupSchemas.sql lives in /toplevel/roles/myrole/files/. I would like to place it in /toplevel/roles/myrole/files/migrations/.

I can't seem to find any docs on how to achieve this, though I can vaguely remember seeing it at one point.

Brian Coca

unread,
Oct 2, 2015, 12:23:08 PM10/2/15
to Ansible Project
just do this:

with_items:
- migrations/V1_1__SetupSchemas.sql

--
Brian Coca
Reply all
Reply to author
Forward
0 new messages