Merge "Fixing tripleo_validator_show_parameter role"
This commit is contained in:
commit
b7f21bdbbd
|
@ -1,3 +1,5 @@
|
|||
---
|
||||
tripleo_validator_show_parameter_debug: false
|
||||
tripleo_validator_show_parameter: []
|
||||
tripleo_validator_show_validation_parameter: []
|
||||
tripleo_validator_show_group_parameter: []
|
||||
|
|
|
@ -9,15 +9,28 @@
|
|||
tripleo_validator_show_parameter_debug: true
|
||||
tasks:
|
||||
|
||||
- name: Check parameter "tripleo_validator_show_parameter" as a single element
|
||||
- name: Check parameter "tripleo_validator_show_validation_parameter" as a single element
|
||||
include_role:
|
||||
name: "tripleo_validator_show_parameter"
|
||||
vars:
|
||||
tripleo_validator_show_parameter:
|
||||
tripleo_validator_show_validation_parameter:
|
||||
- 'foo'
|
||||
|
||||
- name: Assert "tripleo_validator_show_parameter"
|
||||
- name: Assert "tripleo_validator_show_validation_parameter"
|
||||
assert:
|
||||
that:
|
||||
- tripleo_validator_show_parameter_result.stdout ==
|
||||
"tripleo validator show parameter foo"
|
||||
"tripleo validator show parameter --validation foo"
|
||||
|
||||
- name: Check parameter "tripleo_validator_show_group_parameter" as a single element
|
||||
include_role:
|
||||
name: "tripleo_validator_show_parameter"
|
||||
vars:
|
||||
tripleo_validator_show_group_parameter:
|
||||
- 'no-op'
|
||||
|
||||
- name: Assert "tripleo_validator_show_group_parameter"
|
||||
assert:
|
||||
that:
|
||||
- tripleo_validator_show_parameter_result.stdout ==
|
||||
"tripleo validator show parameter --group no-op"
|
||||
|
|
|
@ -1,21 +1,29 @@
|
|||
---
|
||||
- name: Fail if we do not pass parameter
|
||||
- name: Fail if we do not pass validation or group
|
||||
fail:
|
||||
msg: "Please pass tripleo_validator_show_parameter"
|
||||
msg: "Please pass tripleo_validator_show_validation_parameter or tripleo_validator_show_group_parameter"
|
||||
when:
|
||||
- tripleo_validator_show_parameter | length == 0
|
||||
- tripleo_validator_show_validation_parameter | length == 0
|
||||
- tripleo_validator_show_group_parameter | length == 0
|
||||
|
||||
- name: Setup validator show parameter facts
|
||||
set_fact:
|
||||
_validator_show_parameter_cmd: >-
|
||||
{{ openstack_bin }} tripleo validator show parameter
|
||||
{{ tripleo_validator_show_parameter | ternary(' "${TRIPLEO_VALIDATOR_SHOW_PARAMETER}"', '') }}
|
||||
{{ tripleo_validator_show_validation_parameter | ternary('--validation "${TRIPLEO_VALIDATOR_SHOW_VALIDATION_PARAMETER}"', '') }}
|
||||
{{ tripleo_validator_show_group_parameter | ternary('--group "${TRIPLEO_VALIDATOR_SHOW_GROUP_PARAMETER}"', '') }}
|
||||
_validator_show_parameter_env:
|
||||
TRIPLEO_VALIDATOR_SHOW_PARAMETER: >-
|
||||
{%- if tripleo_validator_show_parameter is string -%}
|
||||
{{ tripleo_validator_show_parameter }}
|
||||
TRIPLEO_VALIDATOR_SHOW_VALIDATION_PARAMETER: >-
|
||||
{%- if tripleo_validator_show_validation_parameter is string -%}
|
||||
{{ tripleo_validator_show_validation_parameter }}
|
||||
{%- else -%}
|
||||
{{ tripleo_validator_show_parameter | join(',') }}
|
||||
{{ tripleo_validator_show_validation_parameter | join(',') }}
|
||||
{%- endif -%}
|
||||
TRIPLEO_VALIDATOR_SHOW_GROUP_PARAMETER: >-
|
||||
{%- if tripleo_validator_show_group_parameter is string -%}
|
||||
{{ tripleo_validator_show_group_parameter }}
|
||||
{%- else -%}
|
||||
{{ tripleo_validator_show_group_parameter | join(',') }}
|
||||
{%- endif -%}
|
||||
|
||||
- name: Show debug information
|
||||
|
|
Loading…
Reference in New Issue