diff --git a/bin/pass b/bin/pass new file mode 100755 index 0000000..fc7da13 --- /dev/null +++ b/bin/pass @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -o nounset +set -o errexit + +if [[ ! -e ~/.password-store ]] ; then + printf '%s\n' 'This is the first time running pass, initializting repository ...' + + git clone ssh://git@code.hkoerber.de:2222/hannes/passwordstore.git ~/.password-store + + printf '%s\n' 'Done' +fi + +command -p pass "${@}" diff --git a/user.yml b/user.yml index 278e533..b0bea53 100644 --- a/user.yml +++ b/user.yml @@ -444,28 +444,3 @@ when: user.gpg_key is defined tags: [gpg] - -- block: - - name: add passwordstore init script - copy: - dest: /home/{{ user.name }}/bin - owner: "{{ user.name }}" - group: "{{ user_group_name }}" - mode: '0755' - content: | - #!/usr/bin/env bash - - set -o nounset - set -o errexit - - if [[ ! -e ~/.password-store ]] ; then - printf '%s\n' 'This is the first time running pass, initializting repository ...' - - git clone ssh://git@code.hkoerber.de:2222/hannes/passwordstore.git ~/.password-store - - printf '%s\n' 'Done' - fi - - command -p pass "${@}" - when: user.enable_passwordstore|default(false) is sameas true - tags: [passwordstore]