Hi, I'm looking to use Ansible at our organisation and in order for us to share roles across projects there are some changes needed to the ansible-galaxy command line tool.
The limitations of ansible-galaxy that I wish to address are: * Roles must be published on galaxy.ansible.com or a similar server in order to download the tarball * Roles must be hosted on github.com * Roles must be in a public repository I've seen the role files which attempt to emulate Gemfiles or Podfiles, but I find them lacking. I propose a yaml format which lists roles with the optional addition of a git url and branch/tag/commit. --- - role: 'bennojoy.memcached' - role: 'bennojoy.nginx' git: "https://github.com/bennojoy/nginx" - role: 'bkersten2.ansible-gunicorn' git: url: "https://bitbucket.org/bkersten2/ansible-gunicorn" tag: "v1.0" - role: 'bkersten.ansible-foo' git: url: "https://github.com/bkersten/ansible-foo" branch: "bar" The format allows for the inclusion of private repositories on Github or another git service that can be accessed over https. It also has finer grained control over versions. To download tarballs from private Github/Bitbucket repositories, authentication credentials are added to the command line options. Options: --git-token=GIT_TOKEN Authorization token for access to private git repositories -b BITBUCKET_HEADERS, --bitbucket-header=BITBUCKET_HEADERS HTTP header to pass through when accessing repositories on bitbucket.org eg. ansible-galaxy install -r roles.yml -b "Cookie: bb_session=ikjuakjdhfjkahdsfjk35" Acquiring the Github token is easy and can be found under Account settings -> Applications -> Personal access tokens. Bitbucket however is a pain and the easiest way I found was to set a header for cookies containing the session token. Attempting http digest auth was not successful. Any help improving this would be much appreciated. The changes are found here: https://github.com/bkersten/ansible/commit/4851f46fbf7753161a70287c06a1d36f2b042aea I don't have any private repositories on Github so that specific code path has not been tested. Let me know if this is something we could eventually see merged into Ansible. Best regards, Ben -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/4ada56a5-559a-432c-9e2e-68752b46f676%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
