]> Frank Brehm's Git Trees - pixelpark/pp-admin-tools.git/commitdiff
Hopefully finalizing 389ds plugin configuration
authorFrank Brehm <frank.brehm@pixelpark.com>
Thu, 12 Dec 2024 10:48:59 +0000 (11:48 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Thu, 12 Dec 2024 10:48:59 +0000 (11:48 +0100)
inventory/dpx-ldap-dev1.yaml
roles/389ds-config-plugins/tasks/account-policy.yaml

index 1bce7993a0c1ee47e1f2b0fb0bb165c8126397ec..283791342580f770ded1d8a0079cb209acee5ab7 100644 (file)
@@ -63,10 +63,10 @@ all:
 
 
     # Tempporary
-    ds389_logging_config: false
-    ds389_plugin_memberof_config: false
-    ds389_plugin_referint_config: false
-    ds389_plugin_attr_uniq_config: false
+    ds389_logging_config: false
+    ds389_plugin_memberof_config: false
+    ds389_plugin_referint_config: false
+    ds389_plugin_attr_uniq_config: false
 
 
 # vim: filetype=yaml
index 80f789c8b0cff9a82a0591dbeecf0fa5e3e7db89..3e1714474eb9082e9de0b0193d97ffda9fbd8b93 100644 (file)
         var: plugin_acc_policy_cmd
         verbosity: 0
 
+    - name: "Finally configure the account policy plugin."
+      ansible.builtin.shell: "{{ plugin_acc_policy_cmd }}"
+
+- name: "Check for enabling the account policy plugin."
+  when: "acc_plugin_cfg['enabled'] == false and ds389_plugin_account_policy_enable == true"
+  block:
+
+    - name: "Init + set var plugin_acc_policy_cmd for enabling + restart_389ds."
+      set_fact:
+        plugin_acc_policy_cmd: "dsconf {{ slapd_instance | quote }} plugin account-policy enable"
+        restart_389ds: true
+
+    - name: "Enabling the account policy plugin."
+      ansible.builtin.shell: "{{ plugin_acc_policy_cmd }}"
+
+- name: "Check for disabling the account policy plugin."
+  when: "acc_plugin_cfg['enabled'] == true and ds389_plugin_account_policy_enable == false"
+  block:
+
+    - name: "Init + set var plugin_acc_policy_cmd for enabling + restart_389ds."
+      set_fact:
+        plugin_acc_policy_cmd: "dsconf {{ slapd_instance | quote }} plugin account-policy disable"
+        restart_389ds: true
+
+    - name: "Enabling the account policy plugin."
+      ansible.builtin.shell: "{{ plugin_acc_policy_cmd }}"
+
+
 # vim: filetype=yaml