Hi guys,
I want to install a role automatically via a playbook. But what would be the best way to do this? Is that by using the shell/command module and then ‘ansible-galaxy install’, or is there something better available?
Hi guys,
I want to install a role automatically via a playbook. But what would be the best way to do this? Is that by using the shell/command module and then ‘ansible-galaxy install’, or is there something better available?
Is that by using the shell/command module and then 'ansible-galaxy install'
yes, you can use this method.
Another method you can use is this:
you can use src which is the source of the role. Use the format username.role_name, if downloading from Galaxy
or if you want to download the role from another site you can provide a URL in src field.
for ex:
# from galaxy
- src: yatesr.timezone
for detail information you can follow this link :
http://docs.ansible.com/ansible/latest/galaxy.html#the-website
If all your roles are in git I would advise you to use submodules.