import_role

Collection: builtin

Full Name: import_role

Aliases: ansible.builtin.import_role

Synopsis

Manage import role

Parameters

NameTypeRequiredDefaultDescription
namestringyesThe name of the role to import
tasks_fromstringFile to load from a role’s tasks/ directory
vars_fromstringFile to load from a role’s vars/ directory
defaults_fromstringFile to load from a role’s defaults/ directory
handlers_fromstringFile to load from a role’s handlers/ directory
allow_duplicatesbooltrueAllow a role to be used more than once
rolespec_validatebooltrueValidate the role’s argument spec
publicbooltrueWhether role variables and defaults are exposed to play

Example

- name: Example import_role task
  import_role:
    name: <your_name>