browbeat/ansible/install/roles/nova/tasks/main.yml
Leif Madsen e9ee8a3705
Resolve linting issues for install/connmon.yml
Resolves linting issues:
* [ANSIBLE0012] Commands should not change things if nothing needs doing
* [ANSIBLE0010] Package installs should not use latest
* [ANSIBLE0013] Use shell only when shell functionality is required

Executed via: ansible-lint ansible/install/connmon.yml

Change-Id: Ibe52c904c1ebc083e4aa0db10034c1a628b215b8
2016-08-30 15:15:11 -04:00

22 lines
484 B
YAML

---
#
# Nova connmon tasks
#
- name: Check for connmon in nova.conf
command: grep -Eq 'connection\s?=\s?mysql:' /etc/nova/nova.conf
register: nova_mysql
become: true
ignore_errors: true
changed_when: false
- name: Enable Connmon in nova.conf
command: sed -i 's/mysql:/mysql+connmon:/g' /etc/nova/nova.conf
when: nova_mysql.rc == 0
become: true
notify:
- unmanage nova services
- restart nova services
- manage nova services
- cleanup nova services