This topic describes the Ansible content types indexed by the Ansible Galaxy server.
A role enables the sharing and reuse of Ansible tasks. It contains Ansible playbook tasks, plus all the supporting files, variables, templates, and handlers needed to run the tasks. A role is a complete unit of automation that can be reused and shared.
In practical terms, a role is a directory structure containing all the files, variables, handlers, Jinja templates, and tasks needed to automate a workflow. When a role is created, the default directory structure contains the following:
README.md
defaults/
main.yml
files/
handlers/
main.yml
meta/
main.yml
tasks/
main.yml
templates/
tests/
inventory
test.yml
vars/
main.yml
Using the following keywords, roles can be imported and executed in an Ansible playbook play:
For more on using roles, view the Roles topic at the Ansible docs site
Ansible 2.8 introduced support for a new packaging format for creating and sharing Ansible content. This new format is called a collection, and it lets you combine multiple playbooks, roles, modules, and plugins into a single artifact. To learn more about using collections, visit Using collections in the Ansible documentation.
An Ansible Playbook Bundle (APB) is a lightweight application definition consisting of several named playbooks and a metadata file. An APB defines a short lived container capable of orchestrating the deployment of applications to an OpenShift Origin cluster running the Ansible Service Broker. The short lived container holds a copy of the APB, plus an Ansible runtime environment, and any files required to perform the orchestration, including: playbooks, roles, and dependencies.
For more details regarding the specification, and how to create and use APBs, visit the ansibleplaybookbundle/apb project