2019-11-06 19:26:03 +00:00
|
|
|
---
|
2019-11-09 12:59:37 +00:00
|
|
|
- block:
|
|
|
|
- name: Set pam module configuration
|
|
|
|
pamd:
|
|
|
|
name: "{{ item.name | default('system-auth') }}"
|
|
|
|
type: "{{ item.type | default('auth') }}"
|
|
|
|
module_path: "{{ item.module_path | default('pam_unix.so') }}"
|
|
|
|
control: "{{ item.control }}"
|
|
|
|
new_type: "{{ item.new_type | default(omit) }}"
|
|
|
|
new_module_path: "{{ item.new_module_path | default(omit) }}"
|
|
|
|
new_control: "{{ item.new_control | default(omit) }}"
|
|
|
|
state: "{{ item.state | default('args_present') }}"
|
|
|
|
module_arguments: "{{ item.module_arguments | default(omit) }}"
|
|
|
|
loop: "{{ pam_settings + pam_settings_extra }}"
|
|
|
|
|
2019-11-09 13:02:22 +00:00
|
|
|
- name: Auto-update items with state before/after
|
2019-11-09 12:59:37 +00:00
|
|
|
pamd:
|
|
|
|
name: "{{ item.name | default('system-auth') }}"
|
|
|
|
type: "{{ item.new_type }}"
|
|
|
|
module_path: "{{ item.new_module_path }}"
|
|
|
|
control: "{{ item.new_control }}"
|
|
|
|
state: updated
|
|
|
|
module_arguments: "{{ item.module_arguments | default(omit) }}"
|
|
|
|
loop: "{{ pam_settings + pam_settings_extra }}"
|
|
|
|
when: item.state == "before" or item.state == "after"
|
2019-11-06 19:26:03 +00:00
|
|
|
become: True
|
|
|
|
become_user: root
|