diff --git a/defaults/main.yml b/defaults/main.yml index eec4923a..cc60b684 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -16,6 +16,9 @@ # Defines that the role will be deployed on a host machine is_metal: true +# Enable/Disable Ceilometer +glance_ceilometer_enabled: False + ## Verbosity Options debug: False verbose: True @@ -31,6 +34,7 @@ glance_system_user_home: "/var/lib/{{ glance_system_user_name }}" glance_flavor: "keystone+cachemanagement" glance_registry_host: "{{ internal_lb_vip_address }}" +glance_ceilometer_notification_driver: messagingv2 glance_notification_driver: noop glance_rpc_backend: glance.openstack.common.rpc.impl_kombu glance_default_store: file diff --git a/templates/glance-api.conf.j2 b/templates/glance-api.conf.j2 index b86127c8..17bcf9d5 100644 --- a/templates/glance-api.conf.j2 +++ b/templates/glance-api.conf.j2 @@ -25,8 +25,12 @@ enable_v1_registry = {{ glance_enable_v1_registry }} enable_v2_api = {{ glance_enable_v2_api }} enable_v2_registry = {{ glance_enable_v2_registry }} +{% if glance_ceilometer_enabled %} +notification_driver = {{ glance_ceilometer_notification_driver }} +{% else %} notification_driver = {{ glance_notification_driver }} -{% if glance_notification_driver == "messaging" %} +{% endif %} +{% if glance_notification_driver == "messaging" or (glance_ceilometer_notification_driver == "messagingv2" and glance_ceilometer_enabled) %} ##### RPC MESSAGING OPTIONS ##### rpc_backend = {{ glance_rpc_backend }} rabbit_hosts = {{ rabbitmq_servers }} diff --git a/templates/glance-registry.conf.j2 b/templates/glance-registry.conf.j2 index 66ce65cb..91420877 100644 --- a/templates/glance-registry.conf.j2 +++ b/templates/glance-registry.conf.j2 @@ -16,6 +16,12 @@ backlog = 4096 workers = {{ glance_registry_workers | default(api_threads) }} api_limit_max = 1000 limit_param_default = 25 +{% if glance_ceilometer_enabled %} +notification_driver = {{ glance_notification_driver }} +rpc_backend = {{ glance_rpc_backend }} +rabbit_hosts = {{ rabbitmq_servers }} +rabbit_password = {{ rabbitmq_password }} +{% endif %} [database] connection = mysql://{{ glance_galera_user }}:{{ glance_container_mysql_password }}@{{ glance_galera_address }}/{{ glance_galera_database }}?charset=utf8