ANSIBLE_COLLECTIONS_PATHS Deprecation Warning When Running Ansible Playbooks in Red Hat Satellite
Environment
Red Hat Satellite 6.16
Issue
When an Ansible playbook is executed in the Red Hat Satellite console, the following deprecation warning is displayed:
[DEPRECATION WARNING]: ANSIBLE_COLLECTIONS_PATHS option, does not fit var naming standard, use the singular form ANSIBLE_COLLECTIONS_PATH instead. This feature will be removed from ansible-core in version 2.19. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
Resolution
-
In the file
/etc/foreman-proxy/ansible.envchange the variableCOLLECTIONS_PATHSfromexport ANSIBLE_COLLECTIONS_PATHS="/etc/ansible/collections:/usr/share/ansible/collections"to
export ANSIBLE_COLLECTIONS_PATH="/etc/ansible/collections:/usr/share/ansible/collections" -
As this is a variable rename, no services need to be restarted to refresh the changes.
Root Cause
- The variable
ANSIBLE_COLLECTIONS_PATHSwas deprecated in favor of singularANSIBLE_COLLECTIONS_PATH. The old variable will be removed inansible-coreversion 2.19.
Diagnostic Steps
Whenever an Ansible playbook is executed in the Satellite console.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments