Why Project Sync Taking Considerably Longer Time After Upgrading To Ansible 2.9.13 ?
Environment
- Red Hat® Ansible Tower <= 3.8.x
Issue
- The task in the project sync job: "TASK [fetch galaxy roles from requirements.yml]" takes 2 seconds to complete before Ansible version < 2.9.13 but exact same project sync after upgrading Ansible Tower node to Ansible 2.9.13 takes over 60 seconds.
Resolution
-
This change has been done since Ansible v2.9.11. You can find more information in the link Use the first galaxy server supporting v1 for roles
-
To fix this issue,
-
You need to add the server list in
ansible.cfgor you can specifyPRIMARY GALAXY SERVER URLin Settings Jobs to avoid communication with defaultgalaxy.ansible.com -
Disable
"ALLOW ACCESS TO PUBLIC GALAXY"in UI (settings --> Jobs).
-
NOTE: "PRIMARY GALAXY SERVER URL" can be anything including your internal github server and not just the Galaxy server.
Root Cause
-
Basically the change is to find which server provides the v1 api. This is to fix the issue of Ansible not looking at public galaxy (galaxy.ansible.com) if a given role/collection is not found on Automation Hub. If you dont have a server list in the ansible.cfg or on the Tower, by default ansible.galaxy.com is taken as the server and with the PR it tries to find the api version on it.
-
You can find more information here on Configuring the ansible-galaxy client
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