Compare commits

...

2 Commits

Author SHA1 Message Date
6b06b795cc
ansible-gpg-vault: fix broken add user 2020-06-07 17:33:28 +02:00
3fd64cfb5c
update documentation 2020-06-07 17:32:47 +02:00
2 changed files with 2 additions and 7 deletions

View File

@ -29,7 +29,7 @@ Now make sure you instruct ansible to use the vault script when looking for the
And then you should be done already! Time to create your first vault with the normal ansible way:
$ ansible-vault create host_vars/secrets.yml
< $EDITOR opens >
< $EDITOR for host_vars/secrets.yml opens >
## Usage
@ -52,6 +52,3 @@ Security notice: when a malicious user has decrypted and saved the passphrase wh
## Storage
The passphrase and list of gpg user-ids are stored in `ansible-gpg-vault-store/` in the top level of the repository, as to not dirty the tree of the submodule and allowing to commit the changes in the repo they are meant to be in.
## Storage
The passphrase and list of gpg user-ids are stored in `ansible-gpg-vault-store/` in the top level of the repository, as to not dirty the tree of the submodule and allowing to commit the changes in the repo they are meant to be in.

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;