aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ansible/roles/nova/templates/nova.conf.j26
-rwxr-xr-xansible/site.yml2
2 files changed, 7 insertions, 1 deletions
diff --git a/ansible/roles/nova/templates/nova.conf.j2 b/ansible/roles/nova/templates/nova.conf.j2
index a07751261..98300fc03 100644
--- a/ansible/roles/nova/templates/nova.conf.j2
+++ b/ansible/roles/nova/templates/nova.conf.j2
@@ -76,8 +76,14 @@ rabbit_ha_queues = true
lock_path = /var/lib/nova/tmp
[glance]
+{% if enable_ceph | bool %}
host = {{ kolla_internal_address }}
port = {{ glance_api_port }}
+{% else %}
+api_servers = {% for host in groups['glance-api'] %}{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ glance_api_port }}{% if not loop.last %},{% endif %}{% endfor %}
+
+num_retries = {{ groups['glance-api'] | length }}
+{% endif %}
[cinder]
catalog_info = volume:cinder:internalURL
diff --git a/ansible/site.yml b/ansible/site.yml
index b31c6a546..00e8f64f9 100755
--- a/ansible/site.yml
+++ b/ansible/site.yml
@@ -28,7 +28,7 @@
roles:
- { role: glance, tags: glance, when: enable_glance | bool }
-- hosts: [nova-api, nova-conductor, nova-consoleauth, nova-novncproxy, nova-scheduler, compute, ceph-mon]
+- hosts: [nova-api, nova-conductor, nova-consoleauth, nova-novncproxy, nova-scheduler, compute, ceph-mon, glance-api]
roles:
- { role: nova, tags: nova, when: enable_nova | bool }