tool for building roles, modules and playbooks

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?

Hi Andrew,

(so I had replied to this on twitter about a week ago and asked for the post)

We’ve encouraged contribution to the ansible-galaxy CLI numerous times on this list, so it makes sense to me to see about adding what features you find missing rather than having two tools here.

(To be clear, GitHub only wasn’t a restriction in the download tool, it was in fact the choice of a backing data store for the Galaxy metadata application)

Already, ansible-galaxy can both init roles as well as upload and download them to galaxy.

It also supports a version file and module dependencies.

So what I’d really like to see here is the requirements file that the galaxy CLI supports be expanded to take svn:// and git:// URLs, and also that the requirements file syntax be updated a bit to support svn:// and git:// repos directly, and possibly see where this goes from there.

This has the benefit of being able to increase contributors to the tool, to have one tool not two, and also to reduce namespace confusion by this being named “ansible” on PyPi.

In the end, you’d also benefit by having a lot more users and contributors as well.

–Michael