aboutsummaryrefslogtreecommitdiff
path: root/ansible
diff options
context:
space:
mode:
authorVikram Hosakote <vhosakot@cisco.com>2016-04-04 04:53:22 +0000
committerVikram Hosakote <vhosakot@cisco.com>2016-04-04 04:56:24 +0000
commitc7e261c8c2eb6c4bd4474375ca77e07f24a7822b (patch)
treef2669aff5083ebbf719c5edce12d17592103800c /ansible
parent808d6baa448533b7dca98eca728c06d4323de22b (diff)
downloadkolla-c7e261c8c2eb6c4bd4474375ca77e07f24a7822b.tar.gz
kolla-c7e261c8c2eb6c4bd4474375ca77e07f24a7822b.zip
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
Diffstat (limited to 'ansible')
-rw-r--r--ansible/roles/prechecks/tasks/service_checks.yml6
1 files changed, 6 insertions, 0 deletions
diff --git a/ansible/roles/prechecks/tasks/service_checks.yml b/ansible/roles/prechecks/tasks/service_checks.yml
index 262e6f714..07ec5ac61 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 != ""