Adding heat to connmon

Change-Id: I631ca1feda00aa4205c426a2e9d0441e5ceddbe0
This commit is contained in:
Sindhur Malleni 2016-03-16 16:14:24 -04:00 committed by Sai Sindhur Malleni
parent aa8751cc3f
commit 22a1d7cba4
3 changed files with 50 additions and 0 deletions

View File

@ -24,3 +24,4 @@
- neutron
- keystone
- cinder
- heat

View File

@ -0,0 +1,31 @@
---
#
## Heat handlers for browbeat install connmon
##
#
- name: unmanage heat services
command: pcs resource unmanage {{ item }}
with_items:
- openstack-heat-api
- openstack-heat-engine
ignore_errors: true
- name: restart heat services
service: name={{ item }} state=restarted
with_items:
- openstack-heat-api
- openstack-heat-engine
- name: manage heat services
command: pcs resource manage {{ item }}
with_items:
- openstack-heat-api
- openstack-heat-engine
ignore_errors: true
- name: cleanup heat services
command: pcs resource cleanup {{ item }}
with_items:
- openstack-heat-api
- openstack-heat-engine
ignore_errors: true

View File

@ -0,0 +1,18 @@
#
## Heat connmon tasks
##
#
- name: Check for connmon in heat.conf
shell: grep -Eq 'connection\s?=\s?mysql:' /etc/heat/heat.conf
register: heat_mysql
ignore_errors: true
changed_when: false
- name: Enable Connmon in heat.conf
shell: sed -i 's/mysql:/mysql+connmon:/g' /etc/heat/heat.conf
when: heat_mysql.rc == 0
notify:
- unmanage heat services
- restart heat services
- manage heat services
- cleanup heat services