Include unexisting files

39 views
Skip to first unread message

Dan C

unread,
Oct 8, 2015, 12:19:16 PM10/8/15
to Ansible Project
Hi,

Does someone know if and how to include plays that does not exist at the execution time?
For example.
main.yml

- include: download.yml

- include: /this/file/does/not/exist/yet/configure.yml


I would like to download some files. After download.yml finishes the file "/this/file/does/not/exist/yet/configure.yml" will exist, but not before. I would like to include the configure.yml file which will be an ansible playbook.

Is it possible?

David Karban

unread,
Oct 8, 2015, 12:34:37 PM10/8/15
to ansible...@googlegroups.com
Hi, 

not possible on 1.9. version, do not know, if on 2.0.

David Karban
Linux server specialist/Specialista na správu linuxových serverů
www.karban.eu

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f819c896-7308-4742-b7ac-376902a5d5d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dan C

unread,
Oct 9, 2015, 3:46:42 AM10/9/15
to Ansible Project
Thanks David.
I think it would be a nice feature.
Right now I suppose that I could just run ansible-playbook from within the ansible playbook which would run the "/this/file/does/not/exist/yet/configure.yml" playbook. It should work, shouldn't it? But it even sound so awfull ! ;-)

James Cammarata

unread,
Oct 9, 2015, 2:33:13 PM10/9/15
to ansible...@googlegroups.com
Correct, this is not possible with playbook-level includes, however you could do it with task-level includes in 2.0.

James Cammarata
Director, Ansible Core Engineering
github: jimi-c

Reply all
Reply to author
Forward
0 new messages