Check empty passwords in $CONFIG_DIR/passwords.yml

Co-Authored-By: Carlos Cesario <carloscesario@gmail.com>

Change-Id: Ic2ea835cf38be64a590d3f6b022683081aeb363b
Closes-Bug: #1566150
This commit is contained in:
Vikram Hosakote 2016-04-05 04:44:05 +00:00
parent 1dc48d72b3
commit 8595707a25
2 changed files with 4 additions and 4 deletions

View File

@ -35,8 +35,8 @@
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
- name: Checking empty passwords in passwords.yml. Run kolla-genpwd if this task fails
local_action: command grep '^[^#].*:\s*$' "{{ CONFIG_DIR }}/passwords.yml"
register: result
changed_when: false
failed_when: result.stdout != ""
failed_when: result.stdout | regex_replace('(.*nova_ssh_key.*)', '') | search(":")

View File

@ -160,6 +160,6 @@ case "$1" in
;;
esac
CONFIG_OPTS="-e @${CONFIG_DIR}/globals.yml -e @${CONFIG_DIR}/passwords.yml"
CONFIG_OPTS="-e @${CONFIG_DIR}/globals.yml -e @${CONFIG_DIR}/passwords.yml -e CONFIG_DIR=${CONFIG_DIR}"
CMD="ansible-playbook -i $INVENTORY $CONFIG_OPTS $EXTRA_OPTS $PLAYBOOK $VERBOSITY"
process_cmd