Adding heat to connmon
Change-Id: I631ca1feda00aa4205c426a2e9d0441e5ceddbe0
This commit is contained in:
parent
aa8751cc3f
commit
22a1d7cba4
@ -24,3 +24,4 @@
|
||||
- neutron
|
||||
- keystone
|
||||
- cinder
|
||||
- heat
|
||||
|
31
ansible/install/roles/heat/handlers/main.yml
Normal file
31
ansible/install/roles/heat/handlers/main.yml
Normal 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
|
18
ansible/install/roles/heat/tasks/main.yml
Normal file
18
ansible/install/roles/heat/tasks/main.yml
Normal 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
|
Loading…
Reference in New Issue
Block a user