From c7e261c8c2eb6c4bd4474375ca77e07f24a7822b Mon Sep 17 00:00:00 2001 From: Vikram Hosakote Date: Mon, 4 Apr 2016 04:53:22 +0000 Subject: [PATCH] Check empty passwords in /etc/kolla/passwords.yml in prechecks This patch set makes "kolla-ansible prechecks" flag an error if any password is empty in /etc/kolla/passwords.yml. Change-Id: I87dee25b79c97be64ca49a5638c7f5a30d4cf464 Closes-Bug: #1563506 --- ansible/roles/prechecks/tasks/service_checks.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ansible/roles/prechecks/tasks/service_checks.yml b/ansible/roles/prechecks/tasks/service_checks.yml index 262e6f7149..07ec5ac616 100644 --- a/ansible/roles/prechecks/tasks/service_checks.yml +++ b/ansible/roles/prechecks/tasks/service_checks.yml @@ -34,3 +34,9 @@ or inventory_hostname in groups['neutron-l3-agent'] or inventory_hostname in groups['neutron-metadata-agent']) - ansible_distribution == 'Ubuntu' and ansible_distribution_version == '14.04' + +- name: Checking empty passwords in /etc/kolla/passwords.yml. Run kolla-genpwd is this task fails + local_action: command grep '^[^#].*:\s*$' /etc/kolla/passwords.yml + register: result + changed_when: false + failed_when: result.stdout != ""