2023-11-02 19:51:54 +01:00
|
|
|
---
|
2021-06-21 23:19:46 +02:00
|
|
|
- name: Setup pam_encryptfs auth
|
2023-11-02 19:51:54 +01:00
|
|
|
ansible.builtin.blockinfile:
|
2021-06-21 23:19:46 +02:00
|
|
|
path: /etc/pam.d/system-auth
|
|
|
|
block: |
|
|
|
|
auth [success=1 default=ignore] pam_succeed_if.so service = systemd-user quiet
|
|
|
|
auth required pam_ecryptfs.so unwrap
|
2023-11-02 19:51:54 +01:00
|
|
|
insertafter: ^(auth\s+required\s+pam_unix.so|auth\s+\[default=die\]\s+pam_faillock.so\s+authfail)$
|
2021-06-21 23:19:46 +02:00
|
|
|
marker: "# {mark} AUTOMATROP ECRYPTFS_AUTOMOUNT AUTH"
|
2023-11-02 19:51:54 +01:00
|
|
|
become: true
|
2021-06-21 23:19:46 +02:00
|
|
|
notify:
|
|
|
|
- etc changed
|
|
|
|
|
|
|
|
- name: Setup pam_encryptfs password
|
2023-11-02 19:51:54 +01:00
|
|
|
ansible.builtin.blockinfile:
|
2021-06-21 23:19:46 +02:00
|
|
|
path: /etc/pam.d/system-auth
|
|
|
|
block: |
|
|
|
|
password optional pam_ecryptfs.so unwrap
|
2023-11-02 19:51:54 +01:00
|
|
|
insertbefore: ^(password\s+required\s+pam_unix.so|-password\s+\[success=1\s+default=ignore\]\s+pam_systemd_home.so)$
|
2021-06-21 23:19:46 +02:00
|
|
|
marker: "# {mark} AUTOMATROP ECRYPTFS_AUTOMOUNT PASSWORD"
|
2023-11-02 19:51:54 +01:00
|
|
|
become: true
|
2021-06-21 23:19:46 +02:00
|
|
|
notify:
|
|
|
|
- etc changed
|
|
|
|
|
|
|
|
- name: Setup pam_encryptfs session
|
2023-11-02 19:51:54 +01:00
|
|
|
ansible.builtin.blockinfile:
|
2021-06-21 23:19:46 +02:00
|
|
|
path: /etc/pam.d/system-auth
|
|
|
|
block: |
|
|
|
|
session [success=1 default=ignore] pam_succeed_if.so service = systemd-user quiet
|
|
|
|
session optional pam_ecryptfs.so unwrap
|
2023-11-02 19:51:54 +01:00
|
|
|
insertafter: ^session\s+required\s+pam_unix.so$
|
2021-06-21 23:19:46 +02:00
|
|
|
marker: "# {mark} AUTOMATROP ECRYPTFS_AUTOMOUNT SESSION"
|
2023-11-02 19:51:54 +01:00
|
|
|
become: true
|
2021-06-21 23:19:46 +02:00
|
|
|
notify:
|
|
|
|
- etc changed
|