import_role
Collection: builtin
Full Name: import_role
Aliases: ansible.builtin.import_role
Synopsis
Manage import role
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| name | string | yes | The name of the role to import | |
| tasks_from | string | File to load from a role’s tasks/ directory | ||
| vars_from | string | File to load from a role’s vars/ directory | ||
| defaults_from | string | File to load from a role’s defaults/ directory | ||
| handlers_from | string | File to load from a role’s handlers/ directory | ||
| allow_duplicates | bool | true | Allow a role to be used more than once | |
| rolespec_validate | bool | true | Validate the role’s argument spec | |
| public | bool | true | Whether role variables and defaults are exposed to play |
Example
- name: Example import_role task
import_role:
name: <your_name>