You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/roles/base_totp/tasks/main.yml

23 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