8502c3ad51
They were failing when some of the config files they were checking didn't exist even though that shouldn't be a problem in these particular cases. So this updates the ini module to handle missing files, ini sections and values. In addition, the `failed_when` check is simplified. Change-Id: I6c0fb3ba8b16c7a442f764479b7e3c1703e5939e Closes-Bug: 1620549
26 lines
839 B
YAML
26 lines
839 B
YAML
---
|
|
- hosts: undercloud
|
|
vars:
|
|
metadata:
|
|
name: Undercloud Services Debug Check
|
|
description: >
|
|
The undercloud's openstack services should _not_ have debug enabled.
|
|
This will check if debug is enabled on undercloud services.
|
|
If debug is enabled, the root filesystem can fill up quickly, and
|
|
is not a good thing.
|
|
groups:
|
|
- pre-deployment
|
|
debug_check: "True"
|
|
tasks:
|
|
- name: Check the services for debug flag
|
|
become: true
|
|
ini: path={{ item }} section=DEFAULT key=debug ignore_missing_file=True
|
|
register: config_result
|
|
with_items:
|
|
- /etc/nova/nova.conf
|
|
- /etc/neutron/neutron.conf
|
|
- /etc/ceilometer/ceilometer.conf
|
|
- /etc/heat/heat.conf
|
|
- /etc/ironic/ironic.conf
|
|
failed_when: "debug_check|bool == config_result.value|bool"
|