-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
Description
Summary
the task fails on the filetree_create on the task Get current Collections from the Hub API in the file roles/filetree_create/tasks/hub_collections.yml
Issue Type
- Bug Report
Ansible, Collection, Controller details
ansible --version
ansible [core 2.14.17]
config file = /home/aap/git/ansible-aap/ansible.cfg
configured module search path = ['/home/aap/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.9/site-packages/ansible
ansible collection location = /home/aap/git/ansible-aap/imported/collections:/home/aap/git/ansible-aap/collections
executable location = /usr/bin/ansible
python version = 3.9.21 (main, Dec 5 2024, 00:00:00) [GCC 11.5.0 20240719 (Red Hat 11.5.0-2)] (/usr/bin/python3)
jinja version = 3.1.2
libyaml = True
ansible-galaxy collection list
Collection Version
-------------------------------- ------------
ansible.controller 4.7.4
ansible.eda 2.10.0
ansible.hub 1.0.3
ansible.platform 2.6.20250924
ansible.posix 2.1.0
ansible.utils 6.0.0
community.general 12.0.0
community.hashi_vault 6.2.0
community.postgresql 4.1.0
containers.podman 1.16.4
infra.aap_configuration 3.8.3
infra.aap_configuration_extended 3.0.2
infra.aap_utilities 2.8.0
infra.ee_utilities 4.2.0
kubernetes.core 6.2.0
AAP Version: 2.5.20
- ansible installation method: RPM package
OS / ENVIRONMENT
Red Hat Enterprise Linux release 9.5 (Plow)
Linux 5.14.0-503.23.2.el9_5.x86_64 #1 x86_64 x86_64 x86_64 GNU/Linux
Desired Behavior
works without any failure
Actual Behavior
fails during exporting collections
Playbook fails when running
ansible-playbook -i inventory.yml type_filetree_create.yml# ansible-playbook -i inventory.yml type_filetree_create.yml
TASK [infra.aap_configuration_extended.filetree_create : Get current Collections from the Hub API] *************************************************************
[WARNING]: Collection ansible.platform does not support Ansible version 2.14.17
fatal: [aap-bastion.example.com]: FAILED! => {"msg": "An unhandled exception occurred while running the lookup plugin 'ansible.platform.gateway_api'. Error was a <class 'ansible.errors.AnsibleError'>, original message: The requested object could not be found at api/gateway/v1/https://aap.example.com/api/galaxy/pulp/api/v3/ansible/collections/?limit=100&name=&offset=100, response: HTTP Error 404: Not Found. The requested object could not be found at api/gateway/v1/https://aap.example.com/api/galaxy/pulp/api/v3/ansible/collections/?limit=100&name=&offset=100, response: HTTP Error 404: Not Found"}
STEPS TO REPRODUCE
ansible-playbook -i inventory.yml type_filetree_create.yml
---
- hosts: all
connection: local
gather_facts: false
vars:
aap_username: "{{ vault_aap_username | default(lookup('env', 'CONTROLLER_USERNAME')) }}"
aap_password: "{{ vault_aap_password | default(lookup('env', 'CONTROLLER_PASSWORD')) }}"
aap_hostname: "{{ vault_aap_hostname | default(lookup('env', 'CONTROLLER_HOST')) }}"
aap_validate_certs: "{{ vault_aap_validate_certs | default(lookup('env', 'CONTROLLER_VERIFY_SSL')) }}"
pre_tasks:
- name: "Setup authentication (block)"
block:
- name: "Get the Authentication Token for the future requests"
ansible.builtin.uri:
url: "https://{{ aap_hostname }}/api/gateway/v1/tokens/"
user: "{{ aap_username }}"
password: "{{ aap_password }}"
method: POST
force_basic_auth: true
validate_certs: "{{ aap_validate_certs }}"
status_code: 201
register: authtoken_res
- name: "Set the oauth token to be used since now"
ansible.builtin.set_fact:
aap_oauthtoken: "{{ authtoken_res.json.token }}"
aap_oauthtoken_url: "{{ authtoken_res.json.url }}"
no_log: "{{ controller_configuration_filetree_create_secure_logging | default('false') }}"
when: aap_oauthtoken is not defined
tags:
- always
roles:
- infra.aap_configuration_extended.filetree_create
post_tasks:
- name: "Delete the Authentication Token used"
ansible.builtin.uri:
url: "https://{{ aap_hostname }}{{ aap_oauthtoken_url }}"
user: "{{ aap_username }}"
password: "{{ aap_password }}"
method: DELETE
force_basic_auth: true
validate_certs: "{{ aap_validate_certs }}"
status_code: 204
when: aap_oauthtoken_url is defined