Interview Prep/Ansible/Roles, Collections and Galaxy

Collection installs started failing signature verification after `--keyring` was enabled in CI

AdvancedTroubleshootingRoles, Collections and Galaxy
Answer

Likely causes → The keyring is missing the publisher's public key (for example, the Red Hat or internal Automation Hub signing key), the keyring path in the CI image is wrong, or the server does not serve signatures for some collections. GALAXY_REQUIRED_VALID_SIGNATURE_COUNT then fails the install.

Diagnose →

gpg --no-default-keyring --keyring ~/.ansible/pubring.kbx --list-keys
ansible-galaxy collection verify acme.web_tools --keyring ~/.ansible/pubring.kbx -vvv

Fix → Import the correct signing key into the keyring that the CI image uses. Set GALAXY_REQUIRED_VALID_SIGNATURE_COUNT=+1 only for sources that sign everything. Use --ignore-signature-status-code only for specific known status codes, never as a blanket bypass.

Prevent → Bake keys and the verification settings into the execution environment build, and verify during the build, not at runtime.

All Ansible questions Roadmap: Ansible

More on Roles, Collections and Galaxy