aboutsummaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorGaël THEROND (Fl1nt) <gael.therond@bitswalk.com>2023-05-25 16:39:25 +0200
committerGaël THEROND <gael.therond@bitswalk.com>2023-08-01 11:37:59 +0000
commit7f38e1df71eafb250b14c4e125c7313bd9218f7d (patch)
treea4ca2e2ed4d022998757636e095e4e24344e5574 /docker
parent6786e4384c1a19e4658310e109b8ab9704f5eff9 (diff)
downloadkolla-7f38e1df71eafb250b14c4e125c7313bd9218f7d.tar.gz
kolla-7f38e1df71eafb250b14c4e125c7313bd9218f7d.zip
Improve kolla-toolbox offline support.
* Use structure that allow for custom package version and base URL. Change-Id: I169e51c0f5c691518ada1837990b5bdd2a3d1481 Closes-bug: #2020761
Diffstat (limited to 'docker')
-rw-r--r--docker/kolla-toolbox/Dockerfile.j29
1 files changed, 6 insertions, 3 deletions
diff --git a/docker/kolla-toolbox/Dockerfile.j2 b/docker/kolla-toolbox/Dockerfile.j2
index def4792fc..141c8f7c6 100644
--- a/docker/kolla-toolbox/Dockerfile.j2
+++ b/docker/kolla-toolbox/Dockerfile.j2
@@ -77,16 +77,19 @@ ENV PATH {{ venv_path }}/bin:$PATH
'pyudev',
] %}
-COPY requirements.yml /var/lib/ansible/
RUN {{ macros.install_pip(['pip', 'wheel', 'setuptools']) }} \
&& {{ macros.install_pip(kolla_toolbox_pip_packages | customizable("pip_packages")) }} \
&& mkdir -p /etc/ansible /usr/share/ansible \
&& echo 'localhost ansible_connection=local ansible_python_interpreter={{ venv_path }}/bin/python' > /etc/ansible/hosts \
- && sed -i 's| "identity_api_version": "2.0",| "identity_api_version": "3",|' {{ os_client_config }} \
- && for i in {1..5}; do ansible-galaxy collection install --timeout 120 -p /usr/share/ansible/collections -r /var/lib/ansible/requirements.yml \
+ && sed -i 's| "identity_api_version": "2.0",| "identity_api_version": "3",|' {{ os_client_config }}
+
+{% block kolla_toolbox_collections_install %}
+COPY requirements.yml /var/lib/ansible/
+RUN 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
+{% endblock %}
COPY find_disks.py /usr/share/ansible/
COPY ansible.cfg /etc/ansible/ansible.cfg