]> Frank Brehm's Git Trees - pixelpark/pp-admin-tools.git/commitdiff
Enabling or disabling memberOf plugin in role 389ds-config-plugins
authorFrank Brehm <frank.brehm@pixelpark.com>
Mon, 2 Dec 2024 17:21:49 +0000 (18:21 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Mon, 2 Dec 2024 17:21:49 +0000 (18:21 +0100)
roles/389ds-config-plugins/tasks/memberof.yaml
roles/389ds-config-plugins/vars/main.yaml

index 244e4ad88bae27b8b9a33c0df53949b780be64f7..a8e11120eb47f363c0bcdd75a08d26226cd8bc30 100644 (file)
     - name: "Show the command to execute:"
       debug:
         var: plugin_memberof_cmd
-        verbosity: 0
+        verbosity: 1
 
     - name: "Finally configure the memberof plugin."
       ansible.builtin.shell: "{{ plugin_memberof_cmd }}"
 
+- name: "Enabling memberof plugin."
+  ansible.builtin.shell: "dsconf {{ slapd_instance | quote }} plugin memberof enable"
+  when: "plugin_memberof_config['enabled'] == false and ds389_plugin_memberof_enabled == true"
+
+- name: "Disabling memberof plugin."
+  ansible.builtin.shell: "dsconf {{ slapd_instance | quote }} plugin memberof disable"
+  when: "plugin_memberof_config['enabled'] == true and ds389_plugin_memberof_enabled == false"
 
 # vim: filetype=yaml
index 957a02c9492fff409802b1a43f663ec0aee29efd..cfde2826f1b9983bdb63e1de2e0701564767983b 100644 (file)
@@ -1,6 +1,7 @@
 ---
 
 ds389_plugin_memberof_config: true
+ds389_plugin_memberof_enabled: true
 ds389_plugin_memberof_attr: 'memberOf'
 ds389_plugin_memberof_groupattrs:
   - 'member'