Setting playbook names and labels¶
ARA provides the ability for users to specify playbook names and labels in order to better distinguish playbooks run in different environments or purposes.
Names and labels are also searchable by the ARA API, allowing you to find playbooks matching your query.
Names and labels are set as regular Ansible variables:
These variables can be provided by your Ansible inventory, directly in your playbook file, as extra-vars or any other way supported by Ansible.
For example, in an inventory:
[dev] host1 host2 [dev:vars] ara_playbook_name=deploy-dev ara_playbook_labels='["deploy", "dev"]'
In a playbook:
- 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"]'