Quote OS_PASSWORD with single quotes
Use single quotes around OS_PASSWORD to prevent shell variable expansion. Add a test to validate contents of the openrc file. Closes-Bug: 1663185 Change-Id: I4b1e7b5cb83061ea35108db545fdfa33cef037a5
This commit is contained in:
parent
0738ae8891
commit
6848f7d1b7
@ -11,7 +11,7 @@ export NOVA_ENDPOINT_TYPE={{ openrc_nova_endpoint_type }}
|
||||
export OS_ENDPOINT_TYPE={{ openrc_os_endpoint_type }}
|
||||
export OS_INTERFACE={{ openrc_os_endpoint_type }}
|
||||
export OS_USERNAME={{ openrc_os_username }}
|
||||
export OS_PASSWORD="{{ openrc_os_password }}"
|
||||
export OS_PASSWORD='{{ openrc_os_password }}'
|
||||
export OS_PROJECT_NAME={{ openrc_os_tenant_name }}
|
||||
export OS_TENANT_NAME={{ openrc_os_tenant_name }}
|
||||
export OS_AUTH_URL={{ openrc_os_auth_url }}
|
||||
|
@ -18,14 +18,15 @@
|
||||
roles:
|
||||
- role: "openstack_openrc"
|
||||
post_tasks:
|
||||
- name: Check /root/openrc file
|
||||
stat:
|
||||
- name: Slurp /root/openrc file
|
||||
slurp:
|
||||
path: /root/openrc
|
||||
register: openrc_file
|
||||
- name: Check role functions
|
||||
assert:
|
||||
that:
|
||||
- "openrc_file.stat.exists"
|
||||
- "'export OS_USER_DOMAIN_NAME=Default' in (openrc_file.content | b64decode)"
|
||||
- "'export OS_PASSWORD=\\'secrete\\'' in (openrc_file.content | b64decode)"
|
||||
- name: Check /root/.config/openstack/clouds.yaml file
|
||||
stat:
|
||||
path: /root/.config/openstack/clouds.yaml
|
||||
|
Loading…
x
Reference in New Issue
Block a user