-include_role:name:myrole-name:Run tasks/other.yml instead of 'main'include_role:name:myroletasks_from:other-name:Pass variables to roleinclude_role:name:myrolevars:rolevar1:'valuefromtask'-name:Use role in loopinclude_role:name:myrolewith_items:-'{{roleinput1}}'-'{{roleinput2}}'loop_control:loop_var:roleinputvar-name:conditional roleinclude_role:name:myrolewhen:not idontwanttorun
Before 2.4, as with include, this task could be static or dynamic, If static it implied that it won’t need templating nor loops nor conditionals and will show included tasks in the –list options. Ansible would try to autodetect what is needed, but you can set static to yes or no at task level to control this.
After 2.4, you can use import_role for ‘static’ behaviour and this action for ‘dynamic’ one.
For more information about Red Hat’s this support of this module, please
refer to this knowledge base article<https://access.redhat.com/articles/rhel-top-support-policies>