March 2019
Intermediate to advanced
412 pages
9h 49m
English
With Ansible version 2.2, a new action plugin was made available as a technical preview, include_role. Then, in Ansible Version 2.4, this concept was further developed by the addition of the import_role plugin.
These plugins are used in a task to include and execute an entire role directly from a task. The difference between the two is subtle but important—the include_role plugin is considered dynamic, meaning the code is processed during runtime when the task referencing it is encountered. The import_role plugin, on the other hand, is considered static, meaning all imports are pre-processed at the time the playbook is initially parsed. This has various impacts on their use in playbooks—for example, import_role
Read now
Unlock full access