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
515 B
YAML

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