Re: [ansible-project] Running a dynamically generated playbook.

2020-01-14 Thread Vladimir Botka
On Mon, 13 Jan 2020 23:55:25 -0800 (PST)
Anurag Negi  wrote:

> Hi, I have a requirement to run a dynamically generated playbook from a 
> main playbook. The idea is to run only a main playbook which would be 
> generating a sub-playbook and it would be run from one of the tasks in the 
> main playbook. How do I achieve this ?

It's not possible for 2 reasons. 1) A playbook can't be "run from one of the
tasks". 'import_playbook' is not a task. 2) The file that should be imported
by 'import_playbook' must be ready then the playbook started. Therefor it
can't be "dynamically generated playbook from a main playbook".

HTH,

-vlado

-- 
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-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/20200114112404.32220be0%40gmail.com.


pgpltF7Qb0lo2.pgp
Description: OpenPGP digital signature


[ansible-project] Running a dynamically generated playbook.

2020-01-13 Thread Anurag Negi
Hi, I have a requirement to run a dynamically generated playbook from a 
main playbook. The idea is to run only a main playbook which would be 
generating a sub-playbook and it would be run from one of the tasks in the 
main playbook. How do I achieve this ?

-- 
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-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/23a347ae-3c4e-4120-b80b-3225fa7032b9%40googlegroups.com.