Ansible offers two ways to reuse files and roles in a playbook: dynamic and static.
-
For reuse, add an include_* task in the tasks section of a play:
- include_role
- include_tasks
- include_vars
-
For static reuse, add an import_* task in the tasks section of a play:
- import_role
- import_tasks
Task include and import statements can be used at arbitrary depth.
You can still use the bare roles keyword at the play level to incorporate a role in a playbook statically. However, the bare include keyword, once used for both task files and playbook-level includes, is now deprecated.
It's about turning a dedicated "Thin Client" box into a general purpose computer that can then be tailored to meet your own needs. To this end we need to be able to get them to run a version of Linux that we have complete control over. Depending on the make and model of the hardware this can be a trivial or not so trivial task.