From 74b40af1fd03a83aa684bc18054d763580078b6b Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Mon, 2 Dec 2024 18:21:49 +0100 Subject: [PATCH] Enabling or disabling memberOf plugin in role 389ds-config-plugins --- roles/389ds-config-plugins/tasks/memberof.yaml | 9 ++++++++- roles/389ds-config-plugins/vars/main.yaml | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) 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' -- 2.39.5