ansible-gpg-vault: fix broken add user
This commit is contained in:
parent
3fd64cfb5c
commit
6b06b795cc
4
vault.sh
4
vault.sh
@ -23,11 +23,9 @@ fi;
|
|||||||
|
|
||||||
addUser() {
|
addUser() {
|
||||||
USER="$1"
|
USER="$1"
|
||||||
echo "grep for user $USER"
|
|
||||||
grep "$USER" $KEY_FILE
|
|
||||||
echo "rc=$?"
|
|
||||||
if ! grep -q "$USER" $KEY_FILE; then
|
if ! grep -q "$USER" $KEY_FILE; then
|
||||||
echo "$USER" >> $KEY_FILE
|
echo "$USER" >> $KEY_FILE
|
||||||
|
echo "INFO: added user '$USER' to key file"
|
||||||
else
|
else
|
||||||
echo "WARNING: user '$USER' already in key file"
|
echo "WARNING: user '$USER' already in key file"
|
||||||
fi;
|
fi;
|
||||||
|
Loading…
Reference in New Issue
Block a user