Skip to content
Snippets Groups Projects
Commit 248f0320 authored by František Dvořák's avatar František Dvořák
Browse files

Cleanup vault secret paths

parent 82aef7a6
No related branches found
No related tags found
No related merge requests found
...@@ -18,8 +18,10 @@ ...@@ -18,8 +18,10 @@
- "../deployments/*.yaml" - "../deployments/*.yaml"
- name: Get Secrets from Vault for gateway - name: Get Secrets from Vault for gateway
set_fact: set_fact:
gateways_token: "{{ {'cesnet-mcc': lookup('community.hashi_vault.hashi_vault', vault_mount_point + '/gateway_authtoken:value', gateways_token: "{{ {item: lookup('community.hashi_vault.hashi_vault', vault_mount_point + '/gateway-' + item + ':authtoken',
token_validate=false)} }}" token_validate=false)} }}"
loop:
- cesnet-mcc
# - name: Debug Deployments Secrets # - name: Debug Deployments Secrets
# debug: # debug:
# msg: "{{ item.key }} = {{ item.value }}" # msg: "{{ item.key }} = {{ item.value }}"
......
...@@ -6,12 +6,17 @@ ...@@ -6,12 +6,17 @@
namespace: gateway namespace: gateway
version: 3.2.2 version: 3.2.2
tasks: tasks:
- name: Get Secrets from Vault for gateway
vars:
name: cesnet-mcc
set_fact:
secrets: "{{ lookup('community.hashi_vault.hashi_vault', vault_mount_point + '/gateway-' + name, token_validate=false) }}"
- name: Enterprise Gateway Configuration - name: Enterprise Gateway Configuration
copy: copy:
dest: /tmp/gateway.yaml dest: /tmp/gateway.yaml
mode: 0640 mode: 0640
content: | content: |
authToken: "{{ lookup('community.hashi_vault.hashi_vault', vault_mount_point + '/gateway_authtoken:value', token_validate=true) }}" authToken: "{{ secrets['authtoken'] }}"
global: global:
rbac: true rbac: true
deployment: deployment:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment