-
Notifications
You must be signed in to change notification settings - Fork 423
/
multivault.yml
31 lines (30 loc) · 1.38 KB
/
multivault.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
# ansible-playbook multivault.yml --vault-id var1@prompt --vault-id var2@prompt --vault-id dotted.id@prompt
# Vault password (var1): secret1
# Vault password (var2): secret2
# Vault password (dotted.id): secret3
- hosts: all
gather_facts: false
vars:
first: !vault |
$ANSIBLE_VAULT;1.2;AES256;first
30326539376633656433636231653132623266336338316462356132366361653566303364353335
6665626463633737666336643334353262373836613332650a353531666262636531383430363935
33633465306165393538323336323135393730383563653738666163633835383262396135353765
6238333837306332630a336538623333313636353363326666613564353666623635373432386162
3562
second: !vault |
$ANSIBLE_VAULT;1.2;AES256;second
34653738643565633930336534363230343562343362643432616165373034376565353833366361
6264346330376564643262643166623164323433336631360a396336353866323663613935383534
33643034373439326435373539323433313832366437303764353562653834623966663533613464
3961663934613264360a613763346638636566386461333235366335336564353935356232316265
3164
tasks:
- include_vars:
file: utils/multivault-dotted-vars.yml
when: with_dotted | default(false) | bool
- debug: var=first
- debug: var=second
- debug: var=dotted
when: with_dotted | default(false) | bool