ansible-gpg-vault: fix broken add user

This commit is contained in:
Johanna Dorothea Reichmann 2020-06-07 17:33:28 +02:00
parent 3fd64cfb5c
commit 6b06b795cc
Signed by: transcaffeine
GPG Key ID: 03624C433676E465

View File

@ -23,11 +23,9 @@ fi;
addUser() {
USER="$1"
echo "grep for user $USER"
grep "$USER" $KEY_FILE
echo "rc=$?"
if ! grep -q "$USER" $KEY_FILE; then
echo "$USER" >> $KEY_FILE
echo "INFO: added user '$USER' to key file"
else
echo "WARNING: user '$USER' already in key file"
fi;