
This commit changes the conmon install playbook as well as the required tasks and handlers to use become instead of having the whole playbook run as root by ansible_become. The playbook has been tested against my own cloud. https://trello.com/c/KBFbahdV/38-ansible-remove-ansible-become-from-vars-and-use-become-instead Change-Id: Icf89451371dd9fc5da9880d6a00ae91c88011970
22 lines
506 B
YAML
22 lines
506 B
YAML
---
|
|
#
|
|
# Cinder connmon tasks
|
|
#
|
|
|
|
- name: Check for connmon in cinder.conf
|
|
shell: grep -Eq 'connection\s?=\s?mysql:' /etc/cinder/cinder.conf
|
|
register: cinder_mysql
|
|
become: true
|
|
ignore_errors: true
|
|
changed_when: false
|
|
|
|
- name: Enable Connmon in cinder.conf
|
|
shell: sed -i 's/mysql:/mysql+connmon:/g' /etc/cinder/cinder.conf
|
|
when: cinder_mysql.rc == 0
|
|
become: true
|
|
notify:
|
|
- unmanage cinder services
|
|
- restart cinder services
|
|
- manage cinder services
|
|
- cleanup cinder services
|