ansible/roles/base_totp/tasks/main.yml
Jean-Marie Mineau 58f67e4e86 add variables
2021-04-15 17:10:35 +02:00

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