aboutsummaryrefslogtreecommitdiffstats
path: root/vault.sh
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2023-04-02 11:44:08 +0200
committerRomain Gonçalves <me@rgoncalves.se>2023-04-02 11:45:09 +0200
commit35498e61b26112b56dac4cdda213ebd69bca30b9 (patch)
tree996006ab542948069d37ac6459977cb0f8cf8631 /vault.sh
parent0c70ea19a91fa28cc5f97364ce1276ad5ae6f898 (diff)
downloadrules-35498e61b26112b56dac4cdda213ebd69bca30b9.tar.gz
feat: ansible-vault with gopass + granular host_vars and group_vars
Diffstat (limited to 'vault.sh')
-rwxr-xr-xvault.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/vault.sh b/vault.sh
new file mode 100755
index 0000000..bac110e
--- /dev/null
+++ b/vault.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+set -ex
+
+password_bin=$(command -v pass || command -v gopass)
+password_name="${2:-infrastructure/ansible/root}"
+
+"${password_bin}" show "${password_name}" | head -n 1
remember that computers suck.