mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2026-09-08 21:27:36 +02:00
build
This commit is contained in:
@@ -1,19 +1,13 @@
|
|||||||
- name: Set banner
|
- name: Set banner
|
||||||
become: "{{ false if inventory_hostname == 'nas.home.lan' else true }}"
|
become: "{{ false if inventory_hostname == 'nas.home.lan' else true }}"
|
||||||
block:
|
block:
|
||||||
- name: Read GitLab password from Vault
|
- name: Read the latest version of a kv2 secret from Vault via the remote host with userpass auth
|
||||||
ansible.builtin.set_fact:
|
community.hashi_vault.vault_kv2_get:
|
||||||
gitlab_password: >-
|
url: http://vault.home.lan:8205
|
||||||
{{
|
path: gitlab
|
||||||
lookup(
|
auth_method: token
|
||||||
'community.hashi_vault.hashi_vault',
|
register: response
|
||||||
'secret=secret/data/gitlab '
|
|
||||||
~ 'field=token '
|
|
||||||
~ 'url=http://vault.home.lan:8205 '
|
|
||||||
~ 'token=' ~ lookup('env', 'VAULT_TOKEN')
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
|
|
||||||
- name: Show password
|
- name: Show password
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
var: gitlab_password
|
var: response
|
||||||
Reference in New Issue
Block a user