toolbox: Increase galaxy timeout and retry download

Change-Id: I6e66aea5dc0af61fbc074b4c8ed3910435c98dbd
This commit is contained in:
Michal Nasiadka 2023-02-21 15:13:55 +01:00 committed by Bartosz Bezak
parent 35088cf281
commit 575a090af2
1 changed files with 2 additions and 1 deletions

View File

@ -87,7 +87,8 @@ RUN {{ macros.install_pip(['pip', 'wheel', 'setuptools']) }} \
&& mkdir -p /etc/ansible /usr/share/ansible \
&& echo 'localhost ansible_connection=local ansible_python_interpreter={{ virtualenv_path }}/bin/python' > /etc/ansible/hosts \
&& sed -i 's| "identity_api_version": "2.0",| "identity_api_version": "3",|' {{ os_client_config }} \
&& ansible-galaxy collection install -p /usr/share/ansible/collections -r /var/lib/ansible/requirements.yml
&& for i in {1..5}; do ansible-galaxy collection install --timeout 120 -p /usr/share/ansible/collections -r /var/lib/ansible/requirements.yml \
&& break || sleep 15; done
ENV ANSIBLE_LIBRARY /usr/share/ansible:$ANSIBLE_LIBRARY