mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Explanatory Error Msgs in 0-init/tasks/validate_vars.yml
This commit is contained in:
parent
a1e77805a9
commit
01b9953fc7
1 changed files with 5 additions and 0 deletions
|
@ -86,6 +86,7 @@
|
|||
- name: Assert that {{ vars_checklist | length }} "XYZ_install" vars are all... defined
|
||||
assert:
|
||||
that: "{{ item }}_install is defined"
|
||||
fail_msg: "PLEASE GIVE THIS VARIABLE A PROPER (UNQUOTED) BOOLEAN VALUE e.g. in: /etc/iiab/local_vars.yml"
|
||||
quiet: yes
|
||||
loop: "{{ vars_checklist }}"
|
||||
#register: install_vars_defined
|
||||
|
@ -93,6 +94,7 @@
|
|||
- name: Assert that {{ vars_checklist | length }} "XYZ_enabled" vars are all... defined
|
||||
assert:
|
||||
that: "{{ item }}_enabled is defined"
|
||||
fail_msg: "PLEASE GIVE THIS VARIABLE A PROPER (UNQUOTED) BOOLEAN VALUE e.g. in: /etc/iiab/local_vars.yml"
|
||||
quiet: yes
|
||||
loop: "{{ vars_checklist }}"
|
||||
#register: enabled_vars_defined
|
||||
|
@ -100,6 +102,7 @@
|
|||
- name: Assert that {{ vars_checklist | length }} "XYZ_install" vars are all... type boolean (NOT type string, which can invert logic!)
|
||||
assert:
|
||||
that: "{{ item }}_install | type_debug == 'bool'"
|
||||
fail_msg: "PLEASE GIVE THIS VARIABLE A PROPER (UNQUOTED) BOOLEAN VALUE e.g. in: /etc/iiab/local_vars.yml"
|
||||
quiet: yes
|
||||
loop: "{{ vars_checklist }}"
|
||||
#register: install_vars_boolean
|
||||
|
@ -107,6 +110,7 @@
|
|||
- name: Assert that {{ vars_checklist | length }} "XYZ_enabled" vars are all... type boolean (NOT type string, which can invert logic!)
|
||||
assert:
|
||||
that: "{{ item }}_enabled | type_debug == 'bool'"
|
||||
fail_msg: "PLEASE GIVE THIS VARIABLE A PROPER (UNQUOTED) BOOLEAN VALUE e.g. in: /etc/iiab/local_vars.yml"
|
||||
quiet: yes
|
||||
loop: "{{ vars_checklist }}"
|
||||
#register: enabled_vars_boolean
|
||||
|
@ -114,6 +118,7 @@
|
|||
- name: 'DISALLOW "XYZ_install: False" WITH "XYZ_enabled: True" ...for all {{ vars_checklist | length }} var pairs'
|
||||
assert:
|
||||
that: "{{ item }}_install or not {{ item }}_enabled"
|
||||
fail_msg: "PLEASE VERIFY THESE 2 VARIABLES e.g. in: /etc/iiab/local_vars.yml"
|
||||
#fail_msg: '{{ item }}_install or not {{ item }}_enabled {{ item }}_install is {{ {{ item }}_install }} {{ item }}_enabled is {{ {{ item }}_enabled }}' # Is there a way to output var values ?
|
||||
quiet: yes
|
||||
loop: "{{ vars_checklist }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue