diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2023-04-02 11:44:08 +0200 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2023-04-02 11:45:09 +0200 |
commit | 35498e61b26112b56dac4cdda213ebd69bca30b9 (patch) | |
tree | 996006ab542948069d37ac6459977cb0f8cf8631 /vault.sh | |
parent | 0c70ea19a91fa28cc5f97364ce1276ad5ae6f898 (diff) | |
download | rules-35498e61b26112b56dac4cdda213ebd69bca30b9.tar.gz |
feat: ansible-vault with gopass + granular host_vars and group_vars
Diffstat (limited to 'vault.sh')
-rwxr-xr-x | vault.sh | 8 |
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 |