All my Ansible playbooks/roles are checked in to my git repo.
However, for Ansible Galaxy roles I always have to explicitly download them one by one on every machine
If requirements.yml resides in the roles directory of your project, then Tower/AWX installs the roles automatically.
Here, my requirements are on the role and used in install.yml
main.yml
# tasks file for MY_ROLE
- name: Install requirements
local_action: command ansible-galaxy install -r {{ role_path }}/requirements.yml -p /etc/ansible/roles
- include_tasks: install.yml
.
├── playbook.yml
├── inventory
├── roles
│ └── My_Role
│ ├── tasks
│ │ └── main.yml
│ │ └── install.yml
│ └── requirements.yml