Add non-string value support for CephAnsibleEnvironmentVariables
CephAnsibleEnvironmentVariables data is supposed to be transformed into "KEY=VALUE" format by yaql expression. ``` ceph_ansible_environment_variables: yaql: data: {get_param: CephAnsibleEnvironmentVariables} expression: $.data.items().select($[0] + '=' + $[1]) ``` However, the expression here uses `+` to join the key($[0]) and value($[1]), which will cause syntax error when value is not string type. For example: If we use boolean or integer for environment values such as ``` parameter_defaults: CephAnsibleEnvironmentVariables: ANSIBLE_DEBUG: true ``` the following error will occour ``` overcloud.CephStorageServiceChain: resource_type: OS::TripleO::CephStorageServices physical_resource_id: 51fd6f95-027b-4047-9132-763e1cb8150c status: UPDATE_FAILED status_reason: | resources.CephStorageServiceChain: Error in 4 output role_data: Error in CephBase output role_data: No function "#operator_+" matches supplied arguments ``` Change-Id: I8394cec6bbaca9c89c848eaddf724c072bc36cb3 Closes-Bug: #1878720
This commit is contained in:
parent
0f7cca3e1b
commit
7c46fd0142
|
@ -154,8 +154,8 @@ parameter_defaults:
|
||||||
CephClientKey: 'AQC+vYNXgDAgAhAAc8UoYt+OTz5uhV7ItLdwUw=='
|
CephClientKey: 'AQC+vYNXgDAgAhAAc8UoYt+OTz5uhV7ItLdwUw=='
|
||||||
CephAnsiblePlaybookVerbosity: 1
|
CephAnsiblePlaybookVerbosity: 1
|
||||||
CephAnsibleEnvironmentVariables:
|
CephAnsibleEnvironmentVariables:
|
||||||
ANSIBLE_SSH_RETRIES: '4'
|
ANSIBLE_SSH_RETRIES: 4
|
||||||
DEFAULT_FORKS: '3'
|
DEFAULT_FORKS: 3
|
||||||
CephEnableDashboard: true
|
CephEnableDashboard: true
|
||||||
NovaEnableRbdBackend: true
|
NovaEnableRbdBackend: true
|
||||||
CinderEnableRbdBackend: true
|
CinderEnableRbdBackend: true
|
||||||
|
|
|
@ -127,8 +127,8 @@ parameter_defaults:
|
||||||
dashboard_enabled: false
|
dashboard_enabled: false
|
||||||
CephAnsiblePlaybookVerbosity: 1
|
CephAnsiblePlaybookVerbosity: 1
|
||||||
CephAnsibleEnvironmentVariables:
|
CephAnsibleEnvironmentVariables:
|
||||||
ANSIBLE_SSH_RETRIES: '4'
|
ANSIBLE_SSH_RETRIES: 4
|
||||||
DEFAULT_FORKS: '3'
|
DEFAULT_FORKS: 3
|
||||||
NovaEnableRbdBackend: true
|
NovaEnableRbdBackend: true
|
||||||
CinderEnableRbdBackend: true
|
CinderEnableRbdBackend: true
|
||||||
CinderBackupBackend: ceph
|
CinderBackupBackend: ceph
|
||||||
|
|
|
@ -62,8 +62,8 @@ parameter_defaults:
|
||||||
CephAnsiblePlaybookVerbosity: 1
|
CephAnsiblePlaybookVerbosity: 1
|
||||||
CephAnsibleRepo: "tripleo-centos-ceph-nautilus"
|
CephAnsibleRepo: "tripleo-centos-ceph-nautilus"
|
||||||
CephAnsibleEnvironmentVariables:
|
CephAnsibleEnvironmentVariables:
|
||||||
ANSIBLE_SSH_RETRIES: '4'
|
ANSIBLE_SSH_RETRIES: 4
|
||||||
DEFAULT_FORKS: '3'
|
DEFAULT_FORKS: 3
|
||||||
ManilaCephFSDataPoolPGNum: 16
|
ManilaCephFSDataPoolPGNum: 16
|
||||||
ManilaCephFSMetadataPoolPGNum: 16
|
ManilaCephFSMetadataPoolPGNum: 16
|
||||||
NovaEnableRbdBackend: true
|
NovaEnableRbdBackend: true
|
||||||
|
|
|
@ -67,8 +67,8 @@ parameter_defaults:
|
||||||
CephClientKey: 'AQC+vYNXgDAgAhAAc8UoYt+OTz5uhV7ItLdwUw=='
|
CephClientKey: 'AQC+vYNXgDAgAhAAc8UoYt+OTz5uhV7ItLdwUw=='
|
||||||
CephAnsiblePlaybookVerbosity: 1
|
CephAnsiblePlaybookVerbosity: 1
|
||||||
CephAnsibleEnvironmentVariables:
|
CephAnsibleEnvironmentVariables:
|
||||||
ANSIBLE_SSH_RETRIES: '4'
|
ANSIBLE_SSH_RETRIES: 4
|
||||||
DEFAULT_FORKS: '3'
|
DEFAULT_FORKS: 3
|
||||||
NovaEnableRbdBackend: true
|
NovaEnableRbdBackend: true
|
||||||
CinderEnableRbdBackend: true
|
CinderEnableRbdBackend: true
|
||||||
CephAnsibleRepo: "tripleo-centos-ceph-nautilus"
|
CephAnsibleRepo: "tripleo-centos-ceph-nautilus"
|
||||||
|
|
|
@ -635,7 +635,7 @@ outputs:
|
||||||
ceph_ansible_environment_variables:
|
ceph_ansible_environment_variables:
|
||||||
yaql:
|
yaql:
|
||||||
data: {get_param: CephAnsibleEnvironmentVariables}
|
data: {get_param: CephAnsibleEnvironmentVariables}
|
||||||
expression: $.data.items().select($[0] + '=' + $[1])
|
expression: $.data.items().select($.join('='))
|
||||||
ceph_ansible_skip_tags: {get_param: CephAnsibleSkipTags}
|
ceph_ansible_skip_tags: {get_param: CephAnsibleSkipTags}
|
||||||
- name: get ssh private key
|
- name: get ssh private key
|
||||||
include_role:
|
include_role:
|
||||||
|
|
Loading…
Reference in New Issue