diff --git a/docker/kolla-toolbox/Dockerfile.j2 b/docker/kolla-toolbox/Dockerfile.j2 index c206610b28..061dab08fa 100644 --- a/docker/kolla-toolbox/Dockerfile.j2 +++ b/docker/kolla-toolbox/Dockerfile.j2 @@ -1,6 +1,8 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} MAINTAINER {{ maintainer }} +{% set os_client_config='/usr/lib/python2.7/site-packages/os_client_config/defaults.json' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} RUN yum -y install \ @@ -29,6 +31,10 @@ RUN apt-get -y --no-install-recommends install \ python-dev \ && apt-get clean +{% if base_distro == 'debian' %} + {% set os_client_config='/usr/local/lib/python2.7/dist-packages/os_client_config/defaults.json' %} +{% endif %} + {% endif %} RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \ @@ -50,7 +56,7 @@ RUN git clone https://github.com/ansible/ansible.git \ RUN useradd --user-group ansible --groups kolla \ && mkdir -p /etc/ansible /usr/share/ansible \ && echo 'localhost ansible_connection=local' > /etc/ansible/hosts \ - && sed -i 's| "identity_api_version": "2.0",| "identity_api_version": "3",|' /usr/lib/python2.7/site-packages/os_client_config/defaults.json + && sed -i 's| "identity_api_version": "2.0",| "identity_api_version": "3",|' {{ os_client_config }} COPY find_disks.py kolla_keystone_service.py kolla_keystone_user.py kolla_sanity.py kolla_zookeeper.py /usr/share/ansible/ COPY ansible.cfg /home/ansible/.ansible.cfg