ansible / mazer

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

Allow for multiple pinned versions of a collection to be installed #149

Open alikins opened 5 years ago

alikins commented 5 years ago

Feature Request

For a use case where a project or playbook has a requirements.yml that is specifying versions for roles or collections, if more than one specific version of a collection is installed, mazer will fail.

To support this case, mazer will need some way to allow multiple versions of a collection to be installed at the same time (although, not necessarily in the same content path, but that will be up to implementation).

One of the current design assumptions/requirements for mazer/content path is that there is no support for multiple versions of a content to be installed at the same time. This may need to change.

In combination with the design assumption/requirement that there is only one content path, this means there is no way for mazer to install more than one specific version of a role or collection. This conflicts with some common workflows, including the one suggested by geerlingguy in his ‘how to write a playbook’ talk.

In particular, the suggestions for using a requirements.yml to specify the versions of roles needed for a playbook. If the requirements.yml is used by mazer to install to the default content paths, this will fail attempting to install multiple versions of the same content.

Use Case

What problem does this feature solve? Please describe. A clear and concise description of what the problem is. Ex. I have an issue when [...]

The use case is based on the recommended workflow at https://www.ansible.com/blog/make-your-ansible-playbooks-flexible-maintainable-and-scalable

Proposed Solution

Describe the solution you'd like

There are a couple potential highlevel approaches.

Alternatives

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Implementation

Teachability, Documentation, Adoption, Migration Strategy If you can, explain the user story, and possibly provide a version of the docs. Maybe a screenshot or mockup of the design?

alikins commented 5 years ago

See also discussions on https://github.com/ansible/proposals/issues/7

alikins commented 5 years ago

And to summarize/tl;dr the first post...

There are (at least) three related problems to solve:

  1. Having a way to have multiple versions of a role or collection 'installed' that doesn't conflict on disk

  2. Having a mechanism to select which of the available installed versions are in use at any given time.

  3. The rules and conventions for updating and managing content with multiple versions. Since multiple versions implies that at least one is not the 'latest', there needs to be a way to express how the pinned versions are managed. Historically, in other pkg mgr like tools, this part gets very complicated very quickly.