
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
21 lines
479 B
YAML
21 lines
479 B
YAML
#
|
|
## Heat connmon tasks
|
|
##
|
|
#
|
|
- name: Check for connmon in heat.conf
|
|
shell: grep -Eq 'connection\s?=\s?mysql:' /etc/heat/heat.conf
|
|
register: heat_mysql
|
|
become: true
|
|
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
|
|
become: true
|
|
notify:
|
|
- unmanage heat services
|
|
- restart heat services
|
|
- manage heat services
|
|
- cleanup heat services
|