Include unexisting files

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?

Hi,

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

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 ! :wink:

Correct, this is not possible with playbook-level includes, however you could do it with task-level includes in 2.0.