This repository has been archived on 2020-09-30. You can view files and clone it, but cannot push or open issues or pull requests.
id.autonomic.zone/sbin/encrypt.sh
2020-03-22 15:40:59 +01:00

16 lines
234 B
Bash
Executable File

#!/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"