ansible / mazer

Experimental Ansible Galaxy Content Manager
GNU General Public License v3.0
114 stars 18 forks source link

POC for Ansible Role Loader #106

Closed chouseknecht closed 6 years ago

chouseknecht commented 6 years ago

Work with Matt Davis to get a POC underway to load Ansible content installed by Mazer.

alikins commented 6 years ago

A wip POC that works with current unmodified ansible: https://gist.github.com/alikins/d03ec3bea757e8f18f8d7667ae0c8b82

Another example of that POC, but also using ROLES_PATH precedence as a way to support "short role names": https://gist.github.com/alikins/279f35a26342919899453e6660b859d2

This is based on ansible's ability to reference roles by relative urls.

tima commented 6 years ago

cc @nitzmahone @thaumos

chouseknecht commented 6 years ago

@alikins

From the discussion last week with @thaumos and @nitzmahone, we need to get the POC to a state where the community can try it out and provide feedback. Here's what we agreed to do:

To point 3 above (the one about installation), if it makes sense, could we make Ansible a dependency of Mazer, and specifically reference the feature branch in requirements.txt?

alikins commented 6 years ago

@chouseknecht "To point 3 above (the one about installation), if it makes sense, could we make Ansible a dependency of Mazer, and specifically reference the feature branch in requirements.txt?"

Not sure it makes sense to me (mazer doesn't require ansible to be installed to run) but I'll poke at it a bit and see what happens. Main concern would be if that requirement would cause a 'pip install mazer' to potentially clobber an existing pip install of ansible (if virtualenv or similar tools aren't being used).

alikins commented 6 years ago

https://ironboundsoftware.com/blog/2016/04/18/working-with-pip-branch/ seems to suggest the git branch dep is workable, but then it also mentions:

The first step is to uninstall Project A so that we don’t risk any bizarre cross-talk. This is done by invoking:

pip uninstall project_a

Also seems to generally assume virtualenv is in use, which may not be true. I'll test it out and see what happens.

alikins commented 6 years ago

Add the code to a feature branch in ansible/ansible

https://github.com/ansible/ansible/tree/mazer_role_loader

alikins commented 6 years ago

See https://github.com/ansible/galaxy/pull/972 for galaxy.ansible.com/docs changes