-
Notifications
You must be signed in to change notification settings - Fork 3
Ansible Galaxy 'Lock' file support #165
Comments
Just set up #168 for tracking this, take a look. |
Reopening because this is actually different from just versioning. |
See also: https://github.com/pypa/pipfile |
|
Yarn (Node.js) also has a lock file system similar to PHP's Composer: https://yarnpkg.com/en/docs/yarn-lock |
Similar in Ruby, where bundler is the dependency manager of choice:
As a result, if you keep the See also: |
but I think fuzzy matching and lockfile support are two different issues. the last comments were only concerned about lockfile support @geerlingguy is fuzzy matching still a concern for you? should we split it up in two different issues? Probably also somthing for https://github.com/ansible/proposals |
Yeah, let's drop fuzzy matching from this issue—that will require a bit more work and is probably much lower priority (I know it is for me... a lock file would be AWESOME and help me immediately in so many ways, and is not blocked on versioning discussions, semver etc.). |
It would be helpful if Ansible Galaxy supported a 'lock' file.
When running
ansible-galaxy install -r requirements.yml
, Ansible Galaxy could create arequirements.lock
file (or some other name) that stores the following metadata for each downloaded role:Then, if running the command
ansible-galaxy install -r requirements.yml
again, it would install based on the exact identifiers in the lock file.The details could be a little different, of course, and we'd need a command like
ansible-galaxy update -r requirements.yml
to update an existing lockfile... but this would make idempotent playbook configurations much easier for many projects without requiring all downloaded roles be stored in the project repository (e.g. like Drupal VM currently does.Other examples of lock file support:
Original Request
For Drupal VM, we've decided to pin our requirements.yml file's role requirements to specific versions (e.g.
3.0.1
,2.5.0
, etc.).It would be nice if we could support some method of semver with role versions (instead of just requiring a branch or tag... and maybe this is related to/duplicate of #70), where you could specify a dependency in requirements.yml like:
When galaxy picks the tag to pull, it would check for any in the 1.7.x range, and choose the latest release. That way I don't have to spend so much time maintaining all my requirements files for various projects.
I would love to see something as involved as Composer's Version support, but I know that's a bit of a moonshot. It would be nice to have a lock file that would set the versions currently installed, too, as that would even allow me to set
master
but lock in the versions at a specific point in time.Anyways, I was just thinking about how awesome it is to point at tagged role releases in terms of keeping one's playbook completely idempotent and stable—yet how annoying it is to have to manually tinker with the
requirements.yml
file so often.The text was updated successfully, but these errors were encountered: