add task to auto-run update task if status is before/after
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Robert Kaussow 2019-11-09 13:59:37 +01:00
parent cd80189608
commit 1e789c6642

View File

@ -1,15 +1,27 @@
--- ---
- name: Set pam module configuration - block:
pamd: - name: Set pam module configuration
name: "{{ item.name | default('system-auth') }}" pamd:
type: "{{ item.type | default('auth') }}" name: "{{ item.name | default('system-auth') }}"
module_path: "{{ item.module_path | default('pam_unix.so') }}" type: "{{ item.type | default('auth') }}"
control: "{{ item.control }}" module_path: "{{ item.module_path | default('pam_unix.so') }}"
new_type: "{{ item.new_type | default(omit) }}" control: "{{ item.control }}"
new_module_path: "{{ item.new_module_path | default(omit) }}" new_type: "{{ item.new_type | default(omit) }}"
new_control: "{{ item.new_control | default(omit) }}" new_module_path: "{{ item.new_module_path | default(omit) }}"
state: "{{ item.state | default('args_present') }}" new_control: "{{ item.new_control | default(omit) }}"
module_arguments: "{{ item.module_arguments | default(omit) }}" state: "{{ item.state | default('args_present') }}"
loop: "{{ pam_settings + pam_settings_extra }}" module_arguments: "{{ item.module_arguments | default(omit) }}"
loop: "{{ pam_settings + pam_settings_extra }}"
- name: Auto-update items with state: before/after
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"
become: True become: True
become_user: root become_user: root