Merge pull request #10068 from wenottingham/fail-early-fail-often

Have the project update playbook warn if role/collection syncing is disabled

In recent AWX, a galaxy credential (even a blank one for galaxy.ansible.com) is required to sync role/collection content. This is done so that server precedence can be properly set, and so that it can be configured to pull only from a private content host.
This does lead to bug reports where the credentials are not set, and users don't understand why their content is not syncing. This makes that more clear.

Reviewed-by: Alan Rominger <arominge@redhat.com>
This commit is contained in:
softwarefactory-project-zuul[bot] 2021-05-18 15:29:21 +00:00 committed by GitHub
commit fb7c827bff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -156,6 +156,21 @@
name: Install content with ansible-galaxy command if necessary
tasks:
- name: Check content sync settings
debug:
msg: "Collection and role syncing disabled. Check the AWX_ROLES_ENABLED and AWX_COLLECTIONS_ENABLED settings and Galaxy credentials on the project's organization."
when: not roles_enabled|bool and not collections_enabled|bool
tags:
- install_roles
- install_collections
- name:
meta: end_play
when: not roles_enabled|bool and not collections_enabled|bool
tags:
- install_roles
- install_collections
- block:
- name: fetch galaxy roles from requirements.(yml/yaml)
command: >