include_tasks: multipe yml files

24 views
Skip to first unread message

John Harmon

unread,
Jan 23, 2018, 5:44:01 PM1/23/18
to Ansible Project
I can't seem to find examples on this that show more than one task/yml file.  How can I specify multiple files for include_tasks?

- include_tasks: test.yml, test2.yml, test3.yml
 
when: install_type | lower | search ("n")

The above looks for a file called "test.yml, test2.yml, test3.yml".  I want it to search for 3 individual files.

Uwe Sauter

unread,
Jan 23, 2018, 5:47:34 PM1/23/18
to ansible...@googlegroups.com
What about:

- include_tasks: '{{ item }}'
with_items:
- test.yml
- test2.yml
- test3.yml
when:install_type |lower |search ("n")

Am 23.01.2018 um 23:44 schrieb John Harmon:
> I can't seem to find examples on this that show more than one task/yml file.  How can I specify multiple files for
> include_tasks?
>
> |
> -include_tasks:test.yml,test2.yml,test3.yml
> when:install_type |lower |search ("n")
> |
>
> The above looks for a file called "|test.yml,test2.yml,test3.yml".  I want it to search for 3 individual files.
> |
>
> --
> 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 <mailto:ansible-proje...@googlegroups.com>.
> To post to this group, send email to ansible...@googlegroups.com <mailto:ansible...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/58b055cd-35df-4f6e-ad7e-cf66f9cb2aaf%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/58b055cd-35df-4f6e-ad7e-cf66f9cb2aaf%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

John Harmon

unread,
Jan 23, 2018, 5:49:44 PM1/23/18
to Ansible Project
Doh!  I could kick myself.  I should have known that.  Thank you.


On Tuesday, January 23, 2018 at 3:47:34 PM UTC-7, Uwe Sauter wrote:
What about:

- include_tasks: '{{ item }}'
   with_items:
     - test.yml
     - test2.yml
     - test3.yml
   when:install_type |lower |search ("n")

Am 23.01.2018 um 23:44 schrieb John Harmon:
> I can't seem to find examples on this that show more than one task/yml file.  How can I specify multiple files for
> include_tasks?
>
> |
> -include_tasks:test.yml,test2.yml,test3.yml
> when:install_type |lower |search ("n")
> |
>
> The above looks for a file called "|test.yml,test2.yml,test3.yml".  I want it to search for 3 individual files.
> |
>
> --
> 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
Reply all
Reply to author
Forward
0 new messages