Skip to content
Snippets Groups Projects
Verified Commit 8193b1c7 authored by Jaromír Hradil's avatar Jaromír Hradil
Browse files

Refactoring REST path joining

parent 1eecaf4d
No related branches found
No related tags found
1 merge request!11Refactoring REST path joining
This commit is part of merge request !11. Comments created here will be created in the context of that merge request.
......@@ -3,11 +3,14 @@
hosts: master
vars:
nexus_url: "https://{{ nexus_hostname }}/service/rest/v1"
nexus_admin_password: "{{ lookup('community.hashi_vault.hashi_vault', vault_mount_point + '/nexus_admin_password:value', token_validate=false) }}"
nexus_binder_password: "{{ lookup('community.hashi_vault.hashi_vault', vault_mount_point + '/nexus_binder_password:value', token_validate=false) }}"
nexus_notebooks_password: "{{ lookup('community.hashi_vault.hashi_vault', vault_mount_point + '/nexus_notebooks_password:value',
nexus_admin_password: "{{ lookup('community.hashi_vault.hashi_vault', (vault_mount_point, 'nexus_admin_password:value') | join('/'),
token_validate=false) }}"
nexus_binder_password: "{{ lookup('community.hashi_vault.hashi_vault', (vault_mount_point, 'nexus_binder_password:value') | join('/'),
token_validate=false) }}"
nexus_notebooks_password: "{{ lookup('community.hashi_vault.hashi_vault', (vault_mount_point, 'nexus_notebooks_password:value') | join('/'),
token_validate=false) }}"
nexus_writer_password: "{{ lookup('community.hashi_vault.hashi_vault', (vault_mount_point, 'nexus_writer_password:value') | join('/'),
token_validate=false) }}"
nexus_writer_password: "{{ lookup('community.hashi_vault.hashi_vault', vault_mount_point + '/nexus_writer_password:value', token_validate=false) }}"
nexus_blobstore_name: default
nexus_blobstore_type: file
nexus_repository_name: container-notebooks
......
......@@ -10,7 +10,7 @@
vars:
name: cesnet-mcc
set_fact:
secrets: "{{ lookup('community.hashi_vault.hashi_vault', vault_mount_point + '/gateway-' + name, token_validate=false) }}"
secrets: "{{ lookup('community.hashi_vault.hashi_vault', (vault_mount_point, 'gateway-' + name) | join('/'), token_validate=false) }}"
- name: Enterprise Gateway Configuration
copy:
dest: /tmp/gateway.yaml
......
......@@ -50,7 +50,7 @@
mode: 0644
- name: Mails settings
vars:
fip_hostname: "{{ lookup('dig', groups['fip'][0] + '/PTR') | regex_replace('\\.$', '') }}"
fip_hostname: "{{ lookup('dig', (groups['fip'][0], 'PTR') | join('/')) | regex_replace('\\.$', '') }}"
block:
- name: Global postfix settings
set_fact:
......
......@@ -14,7 +14,7 @@
vars:
name: "{{ item | basename | splitext | first }}"
set_fact:
secrets: "{{ secrets|default({}) | combine({name: lookup('community.hashi_vault.hashi_vault', vault_mount_point + '/deployment-' + name,
secrets: "{{ secrets|default({}) | combine({name: lookup('community.hashi_vault.hashi_vault', (vault_mount_point, 'deployment-' + name) | join('/'),
token_validate=false)}) }}"
with_fileglob:
- "../deployments/*.yaml"
......
......@@ -18,7 +18,7 @@
tasks:
- name: Get Secrets From Vault
set_fact:
secret: "{{ lookup('community.hashi_vault.hashi_vault', vault_mount_point + '/site-' + site_name, token_validate=false) }}"
secret: "{{ lookup('community.hashi_vault.hashi_vault', (vault_mount_point, 'site-' + site_name) | join('/'), token_validate=false) }}"
- name: Debug Secrets
debug:
msg: "{{ item.key }} = {{ item.value }}"
......
......@@ -46,7 +46,7 @@
when: "'fluent' not in ansible_local.helm_repos | map(attribute='name') | list"
- name: Get Secrets from Vault
set_fact:
secrets: "{{ lookup('community.hashi_vault.hashi_vault', vault_mount_point + '/site-' + site_name,
secrets: "{{ lookup('community.hashi_vault.hashi_vault', (vault_mount_point, 'site-' + site_name) | join('/'),
token_validate=false) }}"
- name: Debug Secrets
debug:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment