Adding neutron to connmon
This commit is contained in:
parent
7b3685e746
commit
b46971f053
@ -30,4 +30,5 @@
|
||||
- connmon
|
||||
- nova
|
||||
- keystone
|
||||
- neutron
|
||||
- pbench
|
||||
|
29
ansible/install/roles/neutron/tasks/main.yml
Normal file
29
ansible/install/roles/neutron/tasks/main.yml
Normal file
@ -0,0 +1,29 @@
|
||||
---
|
||||
- name: Check for connmon in neutron.conf
|
||||
shell: grep -Eq 'connection\s?=\s?mysql:' /etc/neutron/neutron.conf
|
||||
register: neutron_mysql
|
||||
when: connmon
|
||||
ignore_errors: true
|
||||
changed_when: no
|
||||
|
||||
- name: Enable Connmon in neutron.conf
|
||||
shell: sed -i 's/mysql:/mysql+connmon:/g' /etc/neutron/neutron.conf
|
||||
when: connmon and neutron_mysql.rc == 0
|
||||
|
||||
- name: Unmanage Neutron Service from pacemaker
|
||||
shell: pcs resource unmanage {{ item }}
|
||||
with_items:
|
||||
- neutron-server
|
||||
when: connmon
|
||||
|
||||
- name: Restart Neutron services
|
||||
service: name={{ item }} state=restarted
|
||||
with_items:
|
||||
- neutron-server
|
||||
when: connmon
|
||||
|
||||
- name: Manage Neutron Service from pacemaker
|
||||
shell: pcs resource manage {{ item }}
|
||||
with_items:
|
||||
- neutron-server
|
||||
when: connmon
|
Loading…
Reference in New Issue
Block a user