Recently released: https://pypi.python.org/pypi/ansible-role-manager
( feedback & contributions welcome! )
Thought process on developing separate tool, rather than contributing it to ansible-galaxy CLI:
-
Encourage reuse across an individual’s or company’s projects as not every role (and module) developed can be open-sourced to ansible galaxy.
-
Remove the github-only restriction. Support for other git repos, mercurial, subversion, bazaar.
-
Improve mechanism for reuse, following pip’s design pattern of installation (not just download) and capture of dependencies for collaborative development on playbooks.
-
Provide structure and best practices for modules and playbooks, not just roles. Best-practice file and directory structure.
Other features on the roadmap:
-
Improve support for versioning, specifically capture version to commit hash so that a user can use a previously defined version (may require additions to the meta/main.yml keywords).
-
Ability to install a role or module from a repo that contains a library of items (instead of each role/module requiring it’s own repo).
-
Provide a system like
setup.py register sdist upload
to enable easier upload of created roles and modules to galaxy. -
plugin support for editors like textmate, note++ and sublime text.
I tried to follow the design patterns of pip and git.
Would be great to contributing the code into ansible!
But here are some of the hurdles:
-
support for module dependencies
-
determine best mechanism to provide source location (right now ansible role manager overloads the ability to pass variables to roles by defining a specific keyword ‘src’. For instance:
- { role: rolenamehere, src: hg+https://bitbucket/myusername/rolenamehere }
- ?
Thoughts?