From 87043bc918e39edbfce9069ca3a0def97b2b159a Mon Sep 17 00:00:00 2001 From: Mark Duggan Date: Fri, 8 Jun 2018 12:11:31 +0100 Subject: [PATCH] config proxy settings inside glance_api container Adding the capability to configure settings for http_proxy https_proxy and no_proxy inside glance_api container. This is required when import images from external http resources behind a proxy. Co-Authored-By: Paul Bourke Closes-bug: #1775815 Change-Id: I85661f04311d5671adecc84c470f2e4db07cfe1d --- ansible/roles/glance/defaults/main.yml | 1 + ansible/roles/glance/handlers/main.yml | 1 + ansible/roles/glance/tasks/config.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/ansible/roles/glance/defaults/main.yml b/ansible/roles/glance/defaults/main.yml index 662c41eff6..245b24b95b 100644 --- a/ansible/roles/glance/defaults/main.yml +++ b/ansible/roles/glance/defaults/main.yml @@ -7,6 +7,7 @@ glance_services: group: glance-api enabled: true image: "{{ glance_api_image_full }}" + environment: "{{ container_proxy }}" volumes: - "{{ node_config_directory }}/glance-api/:{{ container_config_directory }}/:ro" - "/etc/localtime:/etc/localtime:ro" diff --git a/ansible/roles/glance/handlers/main.yml b/ansible/roles/glance/handlers/main.yml index add13420dd..3fdedb0b88 100644 --- a/ansible/roles/glance/handlers/main.yml +++ b/ansible/roles/glance/handlers/main.yml @@ -13,6 +13,7 @@ common_options: "{{ docker_common_options }}" name: "{{ service.container_name }}" image: "{{ service.image }}" + environment: "{{ service.environment }}" volumes: "{{ service.volumes|reject('equalto', '')|list }}" when: - kolla_action != "config" diff --git a/ansible/roles/glance/tasks/config.yml b/ansible/roles/glance/tasks/config.yml index 3ba3078f00..bca8c573d4 100644 --- a/ansible/roles/glance/tasks/config.yml +++ b/ansible/roles/glance/tasks/config.yml @@ -118,6 +118,7 @@ common_options: "{{ docker_common_options }}" name: "{{ item.value.container_name }}" image: "{{ item.value.image }}" + environment: "{{ item.value.environment | default(omit) }}" volumes: "{{ item.value.volumes|reject('equalto', '')|list }}" register: check_glance_containers when: