From db1dddf2ff622af912109593b495b65044cf2052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Sun, 14 Apr 2024 00:27:14 +0200 Subject: [PATCH] Fix pass script --- bin/pass | 14 ++++++++++++++ user.yml | 25 ------------------------- 2 files changed, 14 insertions(+), 25 deletions(-) create mode 100755 bin/pass 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]