Much like the roles: keyword, this task loads a role, but it allows you to control it when the role tasks run in between other tasks of the play.
Most keywords, loops and conditionals will only be applied to the imported tasks, not to this statement itself. If you want the opposite behaviour, use include_role instead.
-hosts:alltasks:-import_role:name:myrole-name:Run tasks/other.yaml instead of 'main'import_role:name:myroletasks_from:other-name:Pass variables to roleimport_role:name:myrolevars:rolevar1:value from task-name:Apply loop to each task in roleimport_role:name:myrolewith_items:-'{{roleinput1}}'-'{{roleinput2}}'loop_control:loop_var:roleinputvar-name:Apply condition to each task in roleimport_role:name:myrolewhen:not idontwanttorun
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>