feat(user/yubikey): implement setup for Yubikey auth

Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2024-07-12 15:02:51 +02:00
parent 28531a4f07
commit f0d4f84ec7
Signed by: mfocko
SSH key fingerprint: SHA256:icm0fIOSJUpy5+1x23sfr+hLtF9UhY8VpMC7H4WFJP8
2 changed files with 17 additions and 0 deletions

View file

@ -0,0 +1,16 @@
---
- name: Create a Yubico directory
ansible.builtin.file:
path: ~/.yubico
state: directory
mode: 0744
owner: "{{ target_user }}"
group: "{{ target_user }}"
- name: Create authorized Yubikeys
ansible.builtin.template:
src: templates/authorized_yubikeys
dest: ~/.yubico/authorized_yubikeys
mode: 0644
owner: "{{ target_user }}"
group: "{{ target_user }}"

View file

@ -0,0 +1 @@
{{ target_user }}:{{ yubikey_token_id }}