Skip to content
Snippets Groups Projects
Commit dc1bce37 authored by Zuul's avatar Zuul Committed by Gerrit Code Review
Browse files

Merge "Fix glance with file backend"

parents 83dbed6b 602f89ba
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,7 @@ glance_services: ...@@ -5,6 +5,7 @@ glance_services:
glance-api: glance-api:
container_name: glance_api container_name: glance_api
group: glance-api group: glance-api
host_in_groups: "{{ inventory_hostname in glance_api_hosts }}"
enabled: true enabled: true
image: "{{ glance_api_image_full }}" image: "{{ glance_api_image_full }}"
environment: "{{ container_proxy }}" environment: "{{ container_proxy }}"
......
...@@ -8,7 +8,9 @@ ...@@ -8,7 +8,9 @@
dest: "{{ node_config_directory }}/glance-api/ceph.conf" dest: "{{ node_config_directory }}/glance-api/ceph.conf"
mode: "0660" mode: "0660"
become: true become: true
when: inventory_hostname in groups['glance-api'] when:
- glance_services['glance-api'].host_in_groups | bool
- glance_services['glance-api'].enabled | bool
notify: notify:
- Restart glance-api container - Restart glance-api container
...@@ -38,7 +40,9 @@ ...@@ -38,7 +40,9 @@
dest: "{{ node_config_directory }}/glance-api/ceph.client.glance.keyring" dest: "{{ node_config_directory }}/glance-api/ceph.client.glance.keyring"
mode: "0600" mode: "0600"
become: true become: true
when: inventory_hostname in groups['glance-api'] when:
- glance_services['glance-api'].host_in_groups | bool
- glance_services['glance-api'].enabled | bool
notify: notify:
- Restart glance-api container - Restart glance-api container
...@@ -49,6 +53,8 @@ ...@@ -49,6 +53,8 @@
recurse: yes recurse: yes
owner: "{{ config_owner_user }}" owner: "{{ config_owner_user }}"
group: "{{ config_owner_group }}" group: "{{ config_owner_group }}"
when: inventory_hostname in groups['glance-api'] when:
- glance_services[item].host_in_groups | bool
- glance_services[item].enabled | bool
with_items: with_items:
- "glance-api" - "glance-api"
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
mode: "0770" mode: "0770"
become: true become: true
when: when:
- inventory_hostname in groups[item.value.group] - item.value.host_in_groups | bool
- item.value.enabled | bool - item.value.enabled | bool
with_dict: "{{ glance_services }}" with_dict: "{{ glance_services }}"
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
- include_tasks: external_ceph.yml - include_tasks: external_ceph.yml
when: when:
- enable_ceph | bool == False - not enable_ceph | bool
- glance_backend_ceph | bool - glance_backend_ceph | bool
- name: Check if policies shall be overwritten - name: Check if policies shall be overwritten
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
become: true become: true
when: when:
- item.value.enabled | bool - item.value.enabled | bool
- inventory_hostname in groups[item.value.group] - item.value.host_in_groups | bool
with_dict: "{{ glance_services }}" with_dict: "{{ glance_services }}"
notify: notify:
- Restart {{ item.key }} container - Restart {{ item.key }} container
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
become: true become: true
when: when:
- item.value.enabled | bool - item.value.enabled | bool
- inventory_hostname in groups[item.value.group] - item.value.host_in_groups | bool
with_dict: "{{ glance_services }}" with_dict: "{{ glance_services }}"
notify: notify:
- Restart {{ item.key }} container - Restart {{ item.key }} container
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
become: true become: true
when: when:
- glance_api.enabled | bool - glance_api.enabled | bool
- inventory_hostname in groups[glance_api.group] - glance_api.host_in_groups | bool
- enable_glance_image_cache | bool - enable_glance_image_cache | bool
notify: notify:
- Restart glance-api container - Restart glance-api container
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
become: true become: true
when: when:
- glance_api.enabled | bool - glance_api.enabled | bool
- inventory_hostname in groups[glance_api.group] - glance_api.host_in_groups | bool
- glance_backend_swift | bool - glance_backend_swift | bool
notify: notify:
- Restart glance-api container - Restart glance-api container
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
become: true become: true
when: when:
- glance_policy_file is defined - glance_policy_file is defined
- inventory_hostname in groups[item.value.group] - item.value.host_in_groups | bool
- item.value.enabled | bool - item.value.enabled | bool
with_dict: "{{ glance_services }}" with_dict: "{{ glance_services }}"
notify: notify:
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
dimensions: "{{ item.value.dimensions }}" dimensions: "{{ item.value.dimensions }}"
when: when:
- kolla_action != "config" - kolla_action != "config"
- inventory_hostname in groups[item.value.group] - item.value.host_in_groups | bool
- item.value.enabled | bool - item.value.enabled | bool
with_dict: "{{ glance_services }}" with_dict: "{{ glance_services }}"
notify: notify:
......
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
dest: "{{ node_config_directory }}/glance-api/" dest: "{{ node_config_directory }}/glance-api/"
mode: "0660" mode: "0660"
become: true become: true
when: inventory_hostname in groups['glance-api'] when:
- glance_services['glance-api'].host_in_groups | bool
- glance_services['glance-api'].enabled | bool
with_fileglob: with_fileglob:
- "{{ node_custom_config }}/glance/ceph*" - "{{ node_custom_config }}/glance/ceph*"
notify: notify:
...@@ -18,6 +20,8 @@ ...@@ -18,6 +20,8 @@
owner: "{{ config_owner_user }}" owner: "{{ config_owner_user }}"
group: "{{ config_owner_group }}" group: "{{ config_owner_group }}"
become: true become: true
when: inventory_hostname in groups['glance-api'] when:
- glance_services[item].host_in_groups | bool
- glance_services[item].enabled | bool
with_items: with_items:
- "glance-api" - "glance-api"
...@@ -13,5 +13,6 @@ ...@@ -13,5 +13,6 @@
timeout: 1 timeout: 1
state: stopped state: stopped
when: when:
- inventory_hostname in groups[glance_services['glance-api']['group']] - glance_services['glance-api'].host_in_groups | bool
- glance_services['glance-api'].enabled | bool
- container_facts['glance_api'] is not defined - container_facts['glance_api'] is not defined
...@@ -6,6 +6,6 @@ ...@@ -6,6 +6,6 @@
common_options: "{{ docker_common_options }}" common_options: "{{ docker_common_options }}"
image: "{{ item.value.image }}" image: "{{ item.value.image }}"
when: when:
- inventory_hostname in groups[item.value.group] - item.value.host_in_groups | bool
- item.value.enabled | bool - item.value.enabled | bool
with_dict: "{{ glance_services }}" with_dict: "{{ glance_services }}"
...@@ -7,3 +7,6 @@ ...@@ -7,3 +7,6 @@
action: "stop_container" action: "stop_container"
common_options: "{{ docker_common_options }}" common_options: "{{ docker_common_options }}"
name: "{{ glance_api.container_name }}" name: "{{ glance_api.container_name }}"
when:
- glance_api.host_in_groups | bool
- glance_api.enabled | bool
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment