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

Repository role has arg validation errors #339

Closed
kbreit-insight opened this issue Nov 23, 2023 · 1 comment
Closed

Repository role has arg validation errors #339

kbreit-insight opened this issue Nov 23, 2023 · 1 comment
Labels
bug Something isn't working new

Comments

@kbreit-insight
Copy link

kbreit-insight commented Nov 23, 2023

Summary

When running the infra.ah_configuration.repository role the execution fails with invalid arguments. It's saying ah_repositories is invalid but the documentation says that's what it should be. I did see

does not include ah_repositories.

Issue Type

  • Bug Report

Ansible, Collection, Private Automation Hub details

ansible [core 2.15.6]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/runner/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  ansible collection location = /home/runner/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.9.18 (main, Sep  7 2023, 00:00:00) [GCC 11.4.1 20230605 (Red Hat 11.4.1-2)] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True

# /usr/share/ansible/collections/ansible_collections
Collection                     Version
------------------------------ -------
ansible.posix                  1.5.4
ansible.utils                  2.11.0
awx.awx                        23.3.1
community.general              8.0.2
infra.ah_configuration         2.0.4
infra.controller_configuration 2.5.2

Private Automation Hub version: 4.6.6
  • ansible installation method: EE

OS / ENVIRONMENT

RHEL 8 with AAP 2.4

Desired Behavior

The playbook should execute the role correctly.

Actual Behavior

  "msg": "Validation of arguments failed:\nah_repositories. Supported parameters include: ah_configuration_async_dir, ah_configuration_repository_secure_logging, ah_configuration_secure_logging, ah_host, ah_password, ah_path_prefix, ah_repository_certified, ah_repository_community, ah_request_timeout, ah_token, ah_username, ah_validate_certs, proxy_password, proxy_url, proxy_username.",

STEPS TO REPRODUCE

  roles:
    - role: infra.ah_configuration.repository
      ah_repository_community:
        url: https://galaxy.ansible.com/api/
        requirements_file: '{{ lookup("ansible.builtin.file", "files/requirements.yaml") }}'
@kbreit-insight kbreit-insight added bug Something isn't working new labels Nov 23, 2023
@Tompage1994
Copy link
Contributor

Tompage1994 commented Nov 24, 2023

As per the changelog, there was a breaking change in v2.0.0 of this collection where the repository role was changed to accept ah_repositories as a list:

breaking_changes:
      - Update collection repository roles to use allow for lists (you now need to
        have a name for each repo and update the variable name) as this has been expanded
        in the newer version of the product.

If you are using AAP2.4 it is recommended to begin using the collection_remote modules and roles instead.

That said, I will create a new issue to tidy up the arg_spec for the role, however the readme is already correct.

It also looks like you have a syntax error with your example as the variable should be under a vars option under the role.

@Tompage1994 Tompage1994 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working new
Projects
None yet
Development

No branches or pull requests

2 participants