set_fact:
acc_plugin_cfg: "{{ plugin_account_policy_config | ansible.builtin.combine(plugin_account_policy_config_entry, list_merge='append_rp', recursive=true) }}"
-- name: "The account-policy Plugin configuration:"
+- name: "The current account-policy Plugin configuration:"
debug:
var: acc_plugin_cfg
verbosity: 0
- name: 'Check for alt-state-attr'
set_fact:
exec_set: true
- when: "ds389_plugin_account_policy_alt_state_attr is not empty and ('altstateattrname' not in acc_plugin_cfg or (acc_plugin_cfg['altstateattrname'] != ds389_plugin_account_policy_alt_state_attr))"
+ when: "ds389_plugin_account_policy_alt_state_attr is not empty \
+ and ('altstateattrname' not in acc_plugin_cfg \
+ or ((acc_plugin_cfg['altstateattrname'] | lower) != (ds389_plugin_account_policy_alt_state_attr | string | lower)))"
- name: 'Check for always-record-login-attr for vanishing'
set_fact:
- name: 'Check for always-record-login-attr'
set_fact:
exec_set: true
- when: "ds389_plugin_account_policy_always_record_login_attr is not empty and ('alwaysrecordloginattr' not in acc_plugin_cfg or (acc_plugin_cfg['alwaysrecordloginattr'] != ds389_plugin_account_policy_always_record_login_attr))"
+ when: "ds389_plugin_account_policy_always_record_login_attr is not empty \
+ and ('alwaysrecordloginattr' not in acc_plugin_cfg \
+ or (acc_plugin_cfg['alwaysrecordloginattr'] != ds389_plugin_account_policy_always_record_login_attr))"
- name: 'Check limit-attr for vanishing'
set_fact:
- name: 'Check limit-attr'
set_fact:
exec_set: true
- when: "ds389_plugin_account_policy_limit_attr is not empty and ('limitattrname' not in acc_plugin_cfg or ((acc_plugin_cfg['limitattrname'] | lower) != (ds389_plugin_account_policy_limit_attr | lower)))"
+ when: "ds389_plugin_account_policy_limit_attr is not empty \
+ and ('limitattrname' not in acc_plugin_cfg \
+ or ((acc_plugin_cfg['limitattrname'] | lower) != (ds389_plugin_account_policy_limit_attr | lower)))"
- name: 'Check spec-attr for vanishing'
set_fact:
- name: 'Check spec-attr'
set_fact:
exec_set: true
- when: "ds389_plugin_account_policy_spec_attr is not empty and ('specattrname' not in acc_plugin_cfg or ((acc_plugin_cfg['specattrname'] | lower) != (ds389_plugin_account_policy_spec_attr | lower)))"
+ when: "ds389_plugin_account_policy_spec_attr is not empty \
+ and ('specattrname' not in acc_plugin_cfg \
+ or ((acc_plugin_cfg['specattrname'] | lower) != (ds389_plugin_account_policy_spec_attr | lower)))"
- name: 'Check state-attr for vanishing'
set_fact:
- name: 'Check state-attr'
set_fact:
exec_set: true
- when: "ds389_plugin_account_policy_state_attr is not empty and ('stateattrname' not in acc_plugin_cfg or ((acc_plugin_cfg['stateattrname'] | lower) != (ds389_plugin_account_policy_state_attr | lower)))"
+ when: "ds389_plugin_account_policy_state_attr is not empty \
+ and ('stateattrname' not in acc_plugin_cfg \
+ or ((acc_plugin_cfg['stateattrname'] | lower) != (ds389_plugin_account_policy_state_attr | lower)))"
- name: 'Check login-history-size for vanishing'
set_fact:
- name: 'Check login-history-size'
set_fact:
exec_set: true
- when: "ds389_plugin_account_policy_login_history_size is not empty and ('lastloginhistsize' not in acc_plugin_cfg or (acc_plugin_cfg['lastloginhistsize'] != ds389_plugin_account_policy_login_history_size ))"
+ when: "ds389_plugin_account_policy_login_history_size is not empty \
+ and ('lastloginhistsize' not in acc_plugin_cfg \
+ or (acc_plugin_cfg['lastloginhistsize'] != ds389_plugin_account_policy_login_history_size ))"
- name: 'Check check-all-state-attrs for vanishing'
set_fact:
- name: 'Check check-all-state-attrs'
set_fact:
exec_set: true
- when: "ds389_plugin_account_policy_check_all_state_attrs is not empty and (('checkallstateattrs' not in acc_plugin_cfg) or (acc_plugin_cfg['checkallstateattrs'] | bool) != (ds389_plugin_account_policy_check_all_state_attrs | bool))"
+ when: "ds389_plugin_account_policy_check_all_state_attrs is not empty \
+ and (('checkallstateattrs' not in acc_plugin_cfg) \
+ or (acc_plugin_cfg['checkallstateattrs'] | bool) != (ds389_plugin_account_policy_check_all_state_attrs | bool))"
- name: "Task block for removing pointless config entries."
when: attrs_remove | length > 0