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_debug: false
|
||||||
tripleo_validator_show_parameter: []
|
tripleo_validator_show_parameter: []
|
||||||
|
tripleo_validator_show_validation_parameter: []
|
||||||
|
tripleo_validator_show_group_parameter: []
|
||||||
|
|
|
@ -9,15 +9,28 @@
|
||||||
tripleo_validator_show_parameter_debug: true
|
tripleo_validator_show_parameter_debug: true
|
||||||
tasks:
|
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:
|
include_role:
|
||||||
name: "tripleo_validator_show_parameter"
|
name: "tripleo_validator_show_parameter"
|
||||||
vars:
|
vars:
|
||||||
tripleo_validator_show_parameter:
|
tripleo_validator_show_validation_parameter:
|
||||||
- 'foo'
|
- 'foo'
|
||||||
|
|
||||||
- name: Assert "tripleo_validator_show_parameter"
|
- name: Assert "tripleo_validator_show_validation_parameter"
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- tripleo_validator_show_parameter_result.stdout ==
|
- 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:
|
fail:
|
||||||
msg: "Please pass tripleo_validator_show_parameter"
|
msg: "Please pass tripleo_validator_show_validation_parameter or tripleo_validator_show_group_parameter"
|
||||||
when:
|
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
|
- name: Setup validator show parameter facts
|
||||||
set_fact:
|
set_fact:
|
||||||
_validator_show_parameter_cmd: >-
|
_validator_show_parameter_cmd: >-
|
||||||
{{ openstack_bin }} tripleo validator show parameter
|
{{ 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:
|
_validator_show_parameter_env:
|
||||||
TRIPLEO_VALIDATOR_SHOW_PARAMETER: >-
|
TRIPLEO_VALIDATOR_SHOW_VALIDATION_PARAMETER: >-
|
||||||
{%- if tripleo_validator_show_parameter is string -%}
|
{%- if tripleo_validator_show_validation_parameter is string -%}
|
||||||
{{ tripleo_validator_show_parameter }}
|
{{ tripleo_validator_show_validation_parameter }}
|
||||||
{%- else -%}
|
{%- 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 -%}
|
{%- endif -%}
|
||||||
|
|
||||||
- name: Show debug information
|
- name: Show debug information
|
||||||
|
|
Loading…
Reference in New Issue