Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing collection at tag 7.13.2 is defaulting to 7.12.0 each time #508

Closed
wkhayrattee opened this issue Nov 28, 2021 · 1 comment
Closed
Labels

Comments

@wkhayrattee
Copy link

I have tried installing the collection via both commandline and via requirements.yml.
But for the sake of this report, I am choosing the commandline version.

COMMAND:

$ ansible-galaxy collection install git+https://github.com/dev-sec/ansible-collection-hardening.git,7.13.2 -vvv

OUTPUT:

ansible-galaxy [core 2.11.6]
  config file = /Users/wasseem/myautomation/test01/ansible.cfg
  configured module search path = ['/Users/wasseem/myautomation/test01/library']
  ansible python module location = /usr/local/Cellar/ansible/4.8.0/libexec/lib/python3.10/site-packages/ansible
  ansible collection location = /Users/wasseem/myautomation/test01/vendor/collections
  executable location = /usr/local/bin/ansible-galaxy
  python version = 3.10.0 (default, Oct 13 2021, 06:44:31) [Clang 12.0.0 (clang-1200.0.32.29)]
  jinja version = 3.0.2
  libyaml = True
Using /Users/wasseem/myautomation/test01/ansible.cfg as config file
[DEPRECATION WARNING]: COMMAND_WARNINGS option, the command warnings feature is being removed. This feature will be removed from ansible-core
 in version 2.14. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
Cloning into '/Users/wasseem/.ansible/tmp/ansible-local-27498q02mw6xd/tmp5_8wkcvn/ansible-collection-hardeningmqmyam4w'...
remote: Enumerating objects: 7385, done.
remote: Counting objects: 100% (974/974), done.
remote: Compressing objects: 100% (462/462), done.
remote: Total 7385 (delta 622), reused 714 (delta 476), pack-reused 6411
Receiving objects: 100% (7385/7385), 1.57 MiB | 429.00 KiB/s, done.
Resolving deltas: 100% (4308/4308), done.
**Note: switching to '7.13.2'.**

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

**HEAD is now at 88ea296 fix tags in galaxy.yml - no dashes allowed**
Starting galaxy collection install process
Process install dependency map
Opened /Users/wasseem/.ansible/galaxy_token
Starting collection install process
**Installing 'devsec.hardening:7.12.0' to** '/Users/wasseem/myautomation/test01/vendor/collections/ansible_collections/devsec/hardening'
Skipping '/Users/wasseem/.ansible/tmp/ansible-local-27498q02mw6xd/tmp5_8wkcvn/ansible-collection-hardeningmqmyam4w/requirements.txt' for collection build
Skipping '/Users/wasseem/.ansible/tmp/ansible-local-27498q02mw6xd/tmp5_8wkcvn/ansible-collection-hardeningmqmyam4w/.yamllint' for collection build
Skipping '/Users/wasseem/.ansible/tmp/ansible-local-27498q02mw6xd/tmp5_8wkcvn/ansible-collection-hardeningmqmyam4w/.gitignore' for collection build
Skipping '/Users/wasseem/.ansible/tmp/ansible-local-27498q02mw6xd/tmp5_8wkcvn/ansible-collection-hardeningmqmyam4w/.github' for collection build
Skipping '/Users/wasseem/.ansible/tmp/ansible-local-27498q02mw6xd/tmp5_8wkcvn/ansible-collection-hardeningmqmyam4w/.gitattributes' for collection build
Skipping '/Users/wasseem/.ansible/tmp/ansible-local-27498q02mw6xd/tmp5_8wkcvn/ansible-collection-hardeningmqmyam4w/.git' for collection build
Skipping '/Users/wasseem/.ansible/tmp/ansible-local-27498q02mw6xd/tmp5_8wkcvn/ansible-collection-hardeningmqmyam4w/galaxy.yml' for collection build

EXPECTATION

Installing 'devsec.hardening:7.13.2' to

ACTUAL RESULT

Installing 'devsec.hardening:7.12.0' to

I am not understanding this behaviour, why is it defaulting to 7.12.0?

@rndmh3ro
Copy link
Member

There was a problem when releasing the new version (these failed actions: https://github.com/dev-sec/ansible-collection-hardening/actions/runs/1493623367 and https://github.com/dev-sec/ansible-collection-hardening/actions/runs/1493665632).

This results in git-tag 7.13.2 having the wrong version number in its galaxy.yml: https://github.com/dev-sec/ansible-collection-hardening/blob/7.13.2/galaxy.yml

But you do get the current content from 7.13.2 so its just an issue with whats shown.

Installing the collection this way should also yield the correct version:

ansible-galaxy collection install devsec.hardening:7.13.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants