In [ ]:
!ansible-galaxy install ioggstream.debug
The role have been downloaded to roles_path or ANSIBLE_ROLES_PATH.
You can inspect it
In [ ]:
!tree /root/.ansible/roles/ioggstream.debug
!cat /root/.ansible/roles/ioggstream.debug/tasks/main.yml
To apply this role to our hosts, use this playbook
- hosts: web
roles:
- role: ioggstream.debug
to install multiple roles, write down a requirements.yml (don't confuse it with python's requirements.txt)
requirements.yml can retrieve roles from galaxy, http or git repositories from the doc
# from galaxy
- src: yatesr.timezone
# from GitHub
- src: https://github.com/bennojoy/nginx
# from a webserver, where the role is packaged in a tar.gz
- src: https://some.webserver.example.com/files/master.tar.gz
name: http-role
# from GitLab or other git-based scm
- src: git@gitlab.company.com:mygroup/ansible-base.git
scm: git
version: "0.1" # quoted, so YAML doesn't parse this as a floating-point value
`
In [ ]: