Playbook names and labels¶
ARA allows users to specify playbook names and labels in order to better distinguish playbooks run in different environments or for different purposes.
Once your playbooks have names and labels, the API allows you to easily search for them, for example:
Names and labels are set as regular Ansible variables:
These variables are picked up by ARA at the beginning of a play and can be provided directly in your playbook file:
- name: Deploy dev environment hosts: dev vars: ara_playbook_name: deploy-dev ara_playbook_labels: - deploy - dev roles: - application
Or as extra-vars:
ansible-playbook -i hosts playbook.yaml \ -e ara_playbook_name=deploy-dev \ -e ara_playbook_labels=deploy,dev
If necessary, ARA can be configured to set one or more labels on every recorded playbook by default.
This can be done either through an
ansible.cfg file like so:
[defaults] # ... [ara] default_labels = first_label,second_label
or through the
ARA_DEFAULT_LABELS environment variable: