From 43517f48f5ab2b9d8fb22dc2a619b8d9f4f494d0 Mon Sep 17 00:00:00 2001 From: Paul Bourke Date: Mon, 3 Oct 2016 15:24:51 +0100 Subject: [PATCH] Make service_checks easier to run independently of kolla-ansible Set a default for CONFIG_DIR in service_checks to more easily allow consumers not using the kolla-ansible tool to run the prechecks. Change-Id: I78bc5dd6f37e6a60ecc6a86d43e56b05803a4fd5 Closes-Bug: #1629893 --- ansible/roles/prechecks/tasks/service_checks.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/prechecks/tasks/service_checks.yml b/ansible/roles/prechecks/tasks/service_checks.yml index add1cc3188..82728aa302 100644 --- a/ansible/roles/prechecks/tasks/service_checks.yml +++ b/ansible/roles/prechecks/tasks/service_checks.yml @@ -38,14 +38,14 @@ - ansible_distribution == 'Ubuntu' and ansible_distribution_version == '14.04' - name: Checking empty passwords in passwords.yml. Run kolla-genpwd if this task fails - local_action: command grep '^[^#].*:\s*$' "{{ CONFIG_DIR }}/passwords.yml" + local_action: command grep '^[^#].*:\s*$' "{{ CONFIG_DIR | default('/etc/kolla') }}/passwords.yml" register: result changed_when: false failed_when: result.stdout | regex_replace('(.*ssh_key.*)', '') | search(":") - name: Checking fernet_token_expiry in globals.yml. Update fernet_token_expiry to allowed value if this task fails run_once: true - local_action: command awk '/^fernet_token_expiry/ { print $2 }' "{{ CONFIG_DIR }}/globals.yml" + local_action: command awk '/^fernet_token_expiry/ { print $2 }' "{{ CONFIG_DIR | default('/etc/kolla') }}/globals.yml" register: result changed_when: false failed_when: result.stdout | regex_replace('(60|120|180|240|300|360|600|720|900|1200|1800|3600|7200|10800|14400|21600|28800|43200|86400|604800)', '') | search(".+")