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

Fails to install #735

Closed
Paddy-CH opened this issue Dec 7, 2023 · 2 comments
Closed

Fails to install #735

Paddy-CH opened this issue Dec 7, 2023 · 2 comments
Labels

Comments

@Paddy-CH
Copy link

Paddy-CH commented Dec 7, 2023

Description

After running ansible-galaxy collection install devsec-hardening-9.0.0.tar.gz -vvvv The process starts but after a while it is killed

Reproduction steps

...[ansible@ansible ~]$ ansible-galaxy collection install devsec-hardening-9.0.0.tar.gz -vvvv
ansible-galaxy [core 2.14.4]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/ansible/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/ansible/.local/lib/python3.9/site-packages/ansible
  ansible collection location = /home/ansible/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/ansible/.local/bin/ansible-galaxy
  python version = 3.9.16 (main, Apr 20 2023, 12:16:10) [GCC 7.3.1 20180712 (Red Hat 7.3.1-15)] (/usr/local/bin/python3.9)
  jinja version = 3.1.2
  libyaml = True
Using /etc/ansible/ansible.cfg as config file
Galaxy cache file at '/home/ansible/.ansible/galaxy_cache/api.json' has an invalid version, clearing
Starting galaxy collection install process
Process install dependency map
Initial connection to galaxy_server: https://galaxy.ansible.com
Opened /home/ansible/.ansible/galaxy_token
Calling Galaxy at https://galaxy.ansible.com/api/
Found

Current Behavior

...
Starting galaxy collection install process
Process install dependency map
Initial connection to galaxy_server: https://galaxy.ansible.com
Opened /home/ansible/.ansible/galaxy_token
Calling Galaxy at https://galaxy.ansible.com/api/
Found API version 'v3, pulp-v3, v1' with Galaxy server default (https://galaxy.ansible.com/api/)
Calling Galaxy at https://galaxy.ansible.com/api/v3/collections/ansible/posix/
Calling Galaxy at https://galaxy.ansible.com/api/v3/collections/ansible/posix/versions/?limit=100
Calling Galaxy at https://galaxy.ansible.com/api/v3/collections/ansible/posix/versions/1.1.1/
Calling Galaxy at https://galaxy.ansible.com/api/v3/collections/ansible/posix/versions/1.5.2/
Calling Galaxy at https://galaxy.ansible.com/api/v3/collections/ansible/posix/versions/1.3.0/
Calling Galaxy at https://galaxy.ansible.com/api/v3/collections/ansible/posix/versions/1.1.0/
Calling Galaxy at https://galaxy.ansible.com/api/v3/collections/ansible/posix/versions/1.4.0/

Eventually I get

Calling Galaxy at https://galaxy.ansible.com/api/v3/collections/community/general/versions/4.8.0/
Calling Galaxy at https://galaxy.ansible.com/api/v3/collections/community/general/versions/4.8.2/
Calling Galaxy at https://galaxy.ansible.com/api/v3/collections/community/general/versions/4.6.0/
Calling Galaxy at https://galaxy.ansible.com/api/v3/collections/community/general/versions/1.3.13/
Calling Galaxy at https://galaxy.ansible.com/api/v3/collections/community/general/versions/1.3.10/
Calling Galaxy at https://galaxy.ansible.com/api/v3/collections/community/general/versions/5.7.0/
Killed

Expected Behavior

...
Should install

OS / Environment

Amazon2 linux

Ansible Version

ansible [core 2.14.4]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/ansible/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/ansible/.local/lib/python3.9/site-packages/ansible
  ansible collection location = /home/ansible/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/ansible/.local/bin/ansible
  python version = 3.9.16 (main, Apr 20 2023, 12:16:10) [GCC 7.3.1 20180712 (Red Hat 7.3.1-15)] (/usr/local/bin/python3.9)
  jinja version = 3.1.2
  libyaml = True

Collection Version

devsec.hardening:9.0.0

Additional information

...
Tried using the online command and downloading the tarball

@Paddy-CH Paddy-CH added the bug label Dec 7, 2023
@rndmh3ro
Copy link
Member

rndmh3ro commented Dec 7, 2023

This works for me:

> ansible-galaxy collection install devsec-hardening-9.0.0.tar.gz --force
Starting galaxy collection install process
Process install dependency map
Starting collection install process
Installing 'devsec.hardening:9.0.0' to '/home/segu/dev/collections/ansible_collections/devsec/hardening'
devsec.hardening:9.0.0 was installed successfully
'ansible.posix:1.4.0' is already installed, skipping.
'community.crypto:2.4.0' is already installed, skipping.
'community.general:7.2.0' is already installed, skipping.
'community.mysql:3.4.0' is already installed, skipping.

This part of your error message

Calling Galaxy at https://galaxy.ansible.com/api/
Found

makes me think that you don't have access to the galaxy. This found looks like a redirect or something.

Try downloading all required collections and install them:

- name: devsec-hardening-9.0.0.tar.gz
- name: ansible-posix-1.5.4.tar.gz
- name: community-mysql-3.8.0.tar.gz
- name: community-crypto-2.16.1.tar.gz
- name: community-general-8.1.0.tar.gz
``

@Paddy-CH
Copy link
Author

Paddy-CH commented Dec 7, 2023

Yep - downloading and installing the dependencies allowed me to install. Many thanks for taking the time to reply.

@Paddy-CH Paddy-CH closed this as completed Dec 7, 2023
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