Hello all,
Hope you are doing well.
Could you please tell me if it's possible to use variables in the include
statement?
I'm trying to do next thing:
1. Have some role, for example 'superrole'.
2. And have some tasks inside it.
3. Use main task to include subtasks based on variables like
# main.yml
---
- include {{ subtask }}.tml
3. To po next in the playbooks:
- { role: superrole, subtask: one_sub_task }
- { role: superrole, subtask: another_sub_task }
Thank you very much,
Alex.
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/ca6eddd4-884c-42eb-acb8-917560e97887%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.