17 lines
238 B
Bash
17 lines
238 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
set -eu -o pipefail
|
||
|
|
||
|
# Usage
|
||
|
# ./encrypt.sh mysecretname mysecretvalue
|
||
|
|
||
|
declare name="$1"
|
||
|
declare secret="$2"
|
||
|
|
||
|
ansible-vault \
|
||
|
encrypt_string \
|
||
|
--vault-password-file ansible/.vault.sh \
|
||
|
--name \
|
||
|
"$name" \
|
||
|
"$secret"
|