From c22e7ba78df1206aac1bf3db3c9197f9db50cec1 Mon Sep 17 00:00:00 2001 From: DTadrzak Date: Tue, 20 Dec 2016 17:27:42 +0100 Subject: [PATCH] Another Glance-fix. Without those changes i wasn't able to run glance-post. Necessary changes in order to make glance-post work. Signed-off-by: DTadrzak --- glance/templates/post.sh.yaml | 40 +++++++++++++++++------------------ glance/templates/post.yaml | 3 +++ 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/glance/templates/post.sh.yaml b/glance/templates/post.sh.yaml index 754f8c0ae5..2415cc8e91 100644 --- a/glance/templates/post.sh.yaml +++ b/glance/templates/post.sh.yaml @@ -7,34 +7,34 @@ data: #!/bin/bash set -ex - ansible localhost -vvv -m kolla_keystone_service -a 'service_name=glance \ + ansible localhost -vvv -m kolla_keystone_service -a "service_name=glance \ service_type=image \ - description="Openstack Image" \ - endpoint_region="{{ .Values.keystone.glance_region_name }}" \ - url="http://glance-api:{{ .Values.network.port.api }}" \ + description='Openstack Image' \ + endpoint_region='{{ .Values.keystone.glance_region_name }}' \ + url='http://glance-api:{{ .Values.network.port.api }}' \ interface=admin \ - region_name="{{ .Values.keystone.admin_region_name }}" \ - auth="{# openstack_glance_auth #}"' \ - -e "{ 'openstack_glance_auth': {{ include "keystone_auth" . }} }" + region_name='{{ .Values.keystone.admin_region_name }}' \ + auth='{{ include "keystone_auth" . }}'" \ + -e "{'openstack_glance_auth': {{ include "keystone_auth" . }}}" - ansible localhost -vvv -m kolla_keystone_service -a 'service_name=glance \ + ansible localhost -vvv -m kolla_keystone_service -a "service_name=glance \ service_type=image \ - description="Openstack Image" \ - endpoint_region="{{ .Values.keystone.glance_region_name }}" \ - url="http://glance-api:{{ .Values.network.port.api }}" \ + description='Openstack Image' \ + endpoint_region='{{ .Values.keystone.glance_region_name }}' \ + url='http://glance-api:{{ .Values.network.port.api }}' \ interface=internal \ - region_name="{{ .Values.keystone.admin_region_name }}" \ - auth="{# openstack_glance_auth #}"' \ + region_name='{{ .Values.keystone.admin_region_name }}' \ + auth='{{ include "keystone_auth" . }}'" \ -e "{ 'openstack_glance_auth': {{ include "keystone_auth" . }} }" - ansible localhost -vvv -m kolla_keystone_service -a 'service_name=glance \ + ansible localhost -vvv -m kolla_keystone_service -a "service_name=glance \ service_type=image \ - description="Openstack Image" \ - endpoint_region="{{ .Values.keystone.glance_region_name }}" \ - url="http://glance-api:{{ .Values.network.port.api }}" \ + description='Openstack Image' \ + endpoint_region='{{ .Values.keystone.glance_region_name }}' \ + url='http://glance-api:{{ .Values.network.port.api }}' \ interface=public \ - region_name="{{ .Values.keystone.admin_region_name }}" \ - auth="{# openstack_glance_auth #}"' \ + region_name='{{ .Values.keystone.admin_region_name }}' \ + auth='{{ include "keystone_auth" . }}'" \ -e "{ 'openstack_glance_auth': {{ include "keystone_auth" . }} }" ansible localhost -vvv -m kolla_keystone_user -a "project=service \ @@ -42,5 +42,5 @@ data: password={{ .Values.keystone.glance_password }} \ role=admin \ region_name={{ .Values.keystone.admin_region_name }} \ - auth="{# openstack_glance_auth #}"' \ + auth='{{ include "keystone_auth" . }}'" \ -e "{ 'openstack_glance_auth': {{ include "keystone_auth" . }} }" diff --git a/glance/templates/post.yaml b/glance/templates/post.yaml index a22d299a20..111f9bdcd7 100644 --- a/glance/templates/post.yaml +++ b/glance/templates/post.yaml @@ -44,6 +44,9 @@ spec: - name: postsh mountPath: /tmp/post.sh subPath: post.sh + env: + - name: ANSIBLE_LIBRARY + value: /usr/share/ansible/ volumes: - name: postsh configMap: