Do initial passwordstore checkout

This commit is contained in:
2021-10-02 12:02:36 +02:00
parent 8011c1827a
commit a03d9c9cd7
4 changed files with 17 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ users:
email: hannes@hkoerber.de email: hannes@hkoerber.de
id: "0xB5C002530C6A2053" id: "0xB5C002530C6A2053"
fingerprint: "973AE48D71B76735C4712B5BB5C002530C6A2053" fingerprint: "973AE48D71B76735C4712B5BB5C002530C6A2053"
enable_passwordstore: true
environment: environment:
MACHINE_HAS_NEXTCLOUD: "true" MACHINE_HAS_NEXTCLOUD: "true"
has_yubikey: true has_yubikey: true

View File

@@ -35,6 +35,7 @@ users:
email: hannes@hkoerber.de email: hannes@hkoerber.de
id: "0xB5C002530C6A2053" id: "0xB5C002530C6A2053"
fingerprint: "973AE48D71B76735C4712B5BB5C002530C6A2053" fingerprint: "973AE48D71B76735C4712B5BB5C002530C6A2053"
enable_passwordstore: true
environment: environment:
MACHINE_HAS_NEXTCLOUD: "true" MACHINE_HAS_NEXTCLOUD: "true"
MACHINE_HAS_RESTIC_BACKUP: "false" MACHINE_HAS_RESTIC_BACKUP: "false"

View File

@@ -29,6 +29,7 @@ users:
email: hannes@hkoerber.de email: hannes@hkoerber.de
id: "0xB5C002530C6A2053" id: "0xB5C002530C6A2053"
fingerprint: "973AE48D71B76735C4712B5BB5C002530C6A2053" fingerprint: "973AE48D71B76735C4712B5BB5C002530C6A2053"
enable_passwordstore: true
environment: environment:
MACHINE_HAS_NEXTCLOUD: "true" MACHINE_HAS_NEXTCLOUD: "true"
MACHINE_HAS_RESTIC_BACKUP: "false" MACHINE_HAS_RESTIC_BACKUP: "false"

View File

@@ -584,3 +584,17 @@
when: user.gpg_key is defined when: user.gpg_key is defined
tags: [gpg] tags: [gpg]
- block:
- name: stat passwordstore checkout
stat:
path: /home/{{ user.name }}/.password-store
register: passwordstore_checkout
- name: check out passwordstore repository
git:
dest: /home/{{ user.name }}/.password-store
repo: ssh://git@code.hkoerber.de:2222/hannes/passwordstore.git
accept_hostkey: true
when: not passwordstore_checkout.stat.exists
when: user.enable_passwordstore|default(false) is sameas true
tags: [passwordstore]