diff --git a/deploy.yml b/deploy.yml index 952cfcd..8480f5b 100644 --- a/deploy.yml +++ b/deploy.yml @@ -4,3 +4,7 @@ become_method: doas roles: - basic + post_tasks: + - name: lbu commit + lbu: + commit: true diff --git a/roles/basic/tasks/main.yml b/roles/basic/tasks/main.yml index 1b618c3..83528c6 100644 --- a/roles/basic/tasks/main.yml +++ b/roles/basic/tasks/main.yml @@ -24,12 +24,10 @@ path: /home/rilla/.ssh/authorized_keys with_file: - public_keys/yubikey + register: ssh_keys - name: commit ssh public keys with lbu lbu: include: - /home/rilla/.ssh/authorized_keys - -- name: lbu commit - lbu: - commit: true + when: ansible_distribution == "Alpine" and ssh_keys.changed