Skip to content

Commit 1109531

Browse files
authored
Merge pull request #725 from stackhpc/correct-stackhpc_write_barbican_role_id_to_file-check
Fixes for Barbican with Vault plugin
2 parents fdbfbfc + 59db209 commit 1109531

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

doc/source/configuration/vault.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ Configure Barbican
296296
[vault_plugin]
297297
vault_url = https://{{ kolla_internal_vip_address }}:8200
298298
use_ssl = True
299+
ssl_ca_crt_file = {% raw %}{{ openstack_cacert }}{% endraw %}
299300
approle_role_id = {{ secrets_barbican_approle_role_id }}
300301
approle_secret_id = {{ secrets_barbican_approle_secret_id }}
301302
kv_mountpoint = barbican

etc/kayobe/ansible/vault-deploy-barbican.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,16 @@
8282
copy:
8383
content: "{{ barbican_role_id.id }}"
8484
dest: "{{ stackhpc_barbican_role_id_file_path | default('~/barbican-role-id') }}"
85-
when: stackhpc_write_barbican_role_id_to_file | bool | default(false)
85+
when: stackhpc_write_barbican_role_id_to_file | default(false) | bool
8686

8787
- name: Check if barbican Approle Secret ID is defined
88-
hashivault_approle_role_secret_list:
88+
hashivault_approle_role_secret_get:
8989
url: "{{ vault_api_addr }}"
9090
ca_cert: "{{ vault_ca_cert }}"
9191
token: "{{ vault_keys.root_token }}"
92+
secret: "{{ secrets_barbican_approle_secret_id }}"
9293
name: barbican
93-
register: barbican_approle_secret_list
94+
register: barbican_approle_secret_get
9495

9596
- name: Ensure barbican AppRole Secret ID is defined
9697
hashivault_approle_role_secret:
@@ -99,4 +100,4 @@
99100
token: "{{ vault_keys.root_token }}"
100101
secret: "{{ secrets_barbican_approle_secret_id }}"
101102
name: barbican
102-
when: barbican_approle_secret_list.secrets is match(secrets_barbican_approle_secret_id)
103+
when: barbican_approle_secret_get.status == "absent"

etc/kayobe/environments/ci-multinode/kolla/config/barbican.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ enabled_secretstore_plugins=vault_plugin
77
[vault_plugin]
88
vault_url = https://{{ kolla_internal_vip_address }}:8200
99
use_ssl = True
10+
ssl_ca_crt_file = {% raw %}{{ openstack_cacert }}{% endraw %}
1011
approle_role_id = {{ secrets_barbican_approle_role_id }}
1112
approle_secret_id = {{ secrets_barbican_approle_secret_id }}
1213
kv_mountpoint = barbican

0 commit comments

Comments
 (0)