feat(user/yubikey): implement setup for Yubikey auth
Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
parent
28531a4f07
commit
f0d4f84ec7
2 changed files with 17 additions and 0 deletions
16
roles/user/yubikey/tasks/main.yml
Normal file
16
roles/user/yubikey/tasks/main.yml
Normal 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 }}"
|
1
roles/user/yubikey/templates/authorized_yubikeys
Normal file
1
roles/user/yubikey/templates/authorized_yubikeys
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{{ target_user }}:{{ yubikey_token_id }}
|
Loading…
Reference in a new issue