From: Frank Brehm Date: Mon, 2 Dec 2024 17:21:49 +0000 (+0100) Subject: Enabling or disabling memberOf plugin in role 389ds-config-plugins X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=74b40af1fd03a83aa684bc18054d763580078b6b;p=pixelpark%2Fpp-admin-tools.git Enabling or disabling memberOf plugin in role 389ds-config-plugins --- diff --git a/roles/389ds-config-plugins/tasks/memberof.yaml b/roles/389ds-config-plugins/tasks/memberof.yaml index 244e4ad..a8e1112 100644 --- a/roles/389ds-config-plugins/tasks/memberof.yaml +++ b/roles/389ds-config-plugins/tasks/memberof.yaml @@ -107,10 +107,17 @@ - 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 diff --git a/roles/389ds-config-plugins/vars/main.yaml b/roles/389ds-config-plugins/vars/main.yaml index 957a02c..cfde282 100644 --- a/roles/389ds-config-plugins/vars/main.yaml +++ b/roles/389ds-config-plugins/vars/main.yaml @@ -1,6 +1,7 @@ --- ds389_plugin_memberof_config: true +ds389_plugin_memberof_enabled: true ds389_plugin_memberof_attr: 'memberOf' ds389_plugin_memberof_groupattrs: - 'member'