From 69aa3ab8b8f5354eb26c7ac1cecd3d0b7932a5ce Mon Sep 17 00:00:00 2001 From: Victor LABORIE Date: Tue, 31 Oct 2017 10:36:18 +0100 Subject: [PATCH] ldap: don't inject custom schema if ldap is already configured --- ldap/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ldap/tasks/main.yml b/ldap/tasks/main.yml index b1554725..84bed58d 100644 --- a/ldap/tasks/main.yml +++ b/ldap/tasks/main.yml @@ -80,8 +80,8 @@ src: "{{ ldap_schema }}" dest: "/root/{{ ldap_schema }}" mode: "0640" - when: ldap_schema is defined + when: not root_ldapvirc_path.stat.exists and ldap_schema is defined - name: inject custom schema command: "ldapadd -Y EXTERNAL -H ldapi:/// -f /root/{{ ldap_schema }}" - when: ldap_schema is defined + when: not root_ldapvirc_path.stat.exists and ldap_schema is defined