5. Ansible roles
5
● Ansible roles are a further level of abstraction that help to organize
playbooks
● Modular
● Reusable
● Configurable
● Distributable?
6. What is Ansible Galaxy?
6
● Official Ansible Roles repository
● Released in 2014
● Published to open source in 2016
● ~15 000 community roles imported
● Relies on GitHub as content provider
8. What is Ansible Galaxy?
8
Command-Line Tool
● ansible-galaxy
● Comes bundled with Ansible
● Installs roles from Galaxy directly
● Or from Git
● Manages roles on the Galaxy website
12. Download and Install Roles
12
from Ansible Galaxy
Install a role:
ansible-galaxy install --roles-path . username.rolename
ansible-galaxy install username.rolename
Install to custom roles path directory:
Install from requirements.yaml file:
ansible-galaxy install -r requirements.yaml
13. Download and Install Roles
13
from any git-based SCM
ansible-galaxy install
git+https://github.com/acme/role.git,v1.2.0
ansible-galaxy install
git@gitlab.acme.com:mygroup/ansible-base.git,0b7cd353...
14. # from Galaxy
- src: bennojoy.nginx
# from GitHub
- src: https://github.com/bennojoy/nginx
# from GitLab or other git-based SCM
- src: git@gitlab.acme.com:mygroup/ansible-base.git
scm: git
version: "0.1"
Download and Install Roles
14
requirements.yaml format
16. Create role
16
Click to add subtitle
Use the init command to initialize the base structure of a new role:
ansible-galaxy init rolename
Using a Custom Role Skeleton
ansible-galaxy init --role-skeleton=/path/to/skeleton
role_name
24. Content vision is changing
24
Roles only
Roles
Modules
Plugins
APBs
Before After
25. Ansible Playbook Bundle (APB)
25
● Used to define and deploy complex groups of applications,
deployment configs, deployments, and services to an OpenShift
Origin cluster running the Ansible Service Broker.
● More details at:
https://github.com/ansibleplaybookbundle/ansible-playbook-bundle
28. PatternFly
28
Open Interface Project
Pattern Library
The PatternFly team designs and develops patterns based on an
understanding of use cases and requirements.
Code
Built on top of both Bootstrap 3 and AngularJS
Styles
Visual styles include color palette, icons, typography, terminology, and
wording.