- Previously people used
ansible-role-ROLE-NAME
and Galaxy removed theansible-role-
part and keptROLE-NAME
- Later on galaxy stopped removing the prefix, and left the role maintainers do the heavy-lefting of setting the
ROLE-NAME
intometa/main.yml:role_name:
However, there's a trick here, hyphens will be replaced with underscores, only the old roles could keep their hyphens x) - Then
meta/main.yml:role_name:
got deprecated, people got pretty angry as they are now stuck withansible-role-ROLE-NAME
naming, then over time they undeprecated the option
- Use underscores
- Name the github repo to the role name of desire without prefixes
- Don't use
meta/main.yml:role_name:
to avoid any magic in the background - Hope there won't be no more surprises :_:
To run on the ansible host set the host: 127.0.0.1
& connection: local
as depicted in this SOA
To run a role on-spot from the terminal directly, fetch the role locally then run
ansible localhost -m include_role -a name=weshouman.vim_env
# Or with sudo privilege
ansible localhost -m include_role -a name=weshouman.vim_env --become
Imports are static and Includes are modular, for more on the differences refer to this SOA