The script assumes the following folder structure:
├── etc
│ ├── ansible
│ │ ├── playbooks
│ │ ├── roles
You can adjust these paths within the script by changing playbooks_path
and roles_path
to fit your folder structure.
Find all roles that are not used by any playbooks
/bin/bash who-plays.bash
Find all playbooks that use a given role
/bin/bash who-plays.bash <role-name>