2017-02-24 14:22:23 +00:00
|
|
|
---
|
2017-06-26 17:00:22 +01:00
|
|
|
- name: Barbican sanity - storing a secret
|
2019-04-09 11:59:02 +00:00
|
|
|
become: true
|
2017-09-25 13:34:59 +08:00
|
|
|
shell: >
|
|
|
|
docker exec -t barbican_api openstack \
|
|
|
|
--os-auth-url={{ openstack_auth.auth_url }} \
|
|
|
|
--os-password={{ openstack_auth.password }} \
|
|
|
|
--os-username={{ openstack_auth.username }} \
|
|
|
|
--os-project-name={{ openstack_auth.project_name }} \
|
|
|
|
secret store -f value -p kolla | head -1
|
2017-06-26 17:00:22 +01:00
|
|
|
register: barbican_store_secret
|
|
|
|
run_once: True
|
|
|
|
when: kolla_enable_sanity_barbican | bool
|
|
|
|
|
|
|
|
- name: Barbican sanity - fetch secret
|
2019-04-09 11:59:02 +00:00
|
|
|
become: true
|
2017-09-25 13:34:59 +08:00
|
|
|
command: >
|
|
|
|
docker exec -t barbican_api openstack
|
|
|
|
--os-auth-url={{ openstack_auth.auth_url }}
|
|
|
|
--os-password={{ openstack_auth.password }}
|
|
|
|
--os-username={{ openstack_auth.username }}
|
|
|
|
--os-project-name={{ openstack_auth.project_name }}
|
|
|
|
secret get -f value -p {{ barbican_store_secret.stdout }}
|
2017-06-26 17:00:22 +01:00
|
|
|
register: barbican_get_secret
|
2017-08-31 22:15:32 +02:00
|
|
|
failed_when: barbican_get_secret.stdout != 'kolla'
|
2017-06-26 17:00:22 +01:00
|
|
|
run_once: True
|
|
|
|
when: kolla_enable_sanity_barbican | bool
|
|
|
|
|
|
|
|
- name: Barbican sanity - cleaning up
|
2019-04-09 11:59:02 +00:00
|
|
|
become: true
|
2017-09-25 13:34:59 +08:00
|
|
|
command: >
|
|
|
|
docker exec -t barbican_api openstack
|
|
|
|
--os-auth-url={{ openstack_auth.auth_url }}
|
|
|
|
--os-password={{ openstack_auth.password }}
|
|
|
|
--os-username={{ openstack_auth.username }}
|
|
|
|
--os-project-name={{ openstack_auth.project_name }}
|
|
|
|
secret delete {{ barbican_store_secret.stdout }}
|
2017-06-26 17:00:22 +01:00
|
|
|
run_once: True
|
|
|
|
when: kolla_enable_sanity_barbican | bool
|