From 1a431de0b8790eeb09463d67ece2eef9c3deb894 Mon Sep 17 00:00:00 2001
From: Eduardo Gonzalez <dabarren@gmail.com>
Date: Mon, 3 Apr 2017 15:42:11 +0100
Subject: [PATCH] Use aodh alarms with tacker

Add auth config for tacker use of aodh alarms and
ceilometer service.

Change-Id: I4bc17bae8e89b7dfcaa824e2b3e08a6fd17f8d36
---
 ansible/roles/tacker/templates/tacker.conf.j2 | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/ansible/roles/tacker/templates/tacker.conf.j2 b/ansible/roles/tacker/templates/tacker.conf.j2
index ca962d850d..2a126912c3 100644
--- a/ansible/roles/tacker/templates/tacker.conf.j2
+++ b/ansible/roles/tacker/templates/tacker.conf.j2
@@ -16,6 +16,12 @@ nova_admin_password = {{ nova_keystone_password }}
 nova_admin_tenant_id = service
 nova_admin_auth_url = {{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_admin_port }}
 
+[tacker]
+monitor_driver = ping,http_ping
+{% if enable_ceilometer | bool %}
+alarm_monitor_driver = ceilometer
+{% endif %}
+
 [tacker_nova]
 auth_uri = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_public_port }}
 auth_url = {{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_admin_port }}
@@ -46,6 +52,20 @@ memcache_security_strategy = ENCRYPT
 memcache_secret_key = {{ memcache_secret_key }}
 memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %}
 
+{% if enable_aodh | bool %}
+[alarm_auth]
+username = {{ tacker_keystone_user }}
+password = {{ tacker_keystone_password }}
+project_name = service
+url = {{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_admin_port }}
+{% endif %}
+
+{% if enable_ceilometer | bool %}
+[ceilometer]
+host = {{ api_interface_address }}
+port = {{ tacker_server_port }}
+{% endif %}
+
 {% if enable_heat | bool %}
 [tacker_heat]
 heat_uri = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ heat_api_port }}/v1