22 lines
487 B
YAML
22 lines
487 B
YAML
---
|
|
- name: Install the PAM lib
|
|
apt:
|
|
name:
|
|
- libpam-oath
|
|
state: latest
|
|
update_cache: true
|
|
register: apt_result
|
|
retries: 3
|
|
until: apt_result is succeeded
|
|
|
|
- name: Add the totp secret for users
|
|
lineinfile:
|
|
path: /etc/users.oath
|
|
regexp: "{{ item.name }}"
|
|
line: "HOTP/T{{ totp_periode }}/{{ totp_digits }} {{ item.name }} - {{item.totp}}"
|
|
create: true
|
|
group: root
|
|
owner: root
|
|
mode: '600'
|
|
loop: "{{ uservault_users }}"
|
|
no_log: true
|