[SUCS Devel] [Git][sucs/sucs][master] Improve ldap-server role

Imran Hussain imranh at sucs.org
Sun Jan 8 14:58:27 GMT 2017


Imran Hussain pushed to branch master at sucs / SUCS


Commits:
c372ce2a by Imran Hussain at 2017-01-08T15:00:11+00:00
Improve ldap-server role

- - - - -


2 changed files:

- + ansible/roles/ldap-server/handlers/main.yml
- ansible/roles/ldap-server/tasks/main.yml


Changes:

=====================================
ansible/roles/ldap-server/handlers/main.yml
=====================================
--- /dev/null
+++ b/ansible/roles/ldap-server/handlers/main.yml
@@ -0,0 +1,7 @@
+- name: reconfigure slapd
+  command: dpkg-reconfigure --frontend noninteractive slapd
+  
+- name: restart slapd
+  service:
+    name: slapd
+    state: restarted
\ No newline at end of file


=====================================
ansible/roles/ldap-server/tasks/main.yml
=====================================
--- a/ansible/roles/ldap-server/tasks/main.yml
+++ b/ansible/roles/ldap-server/tasks/main.yml
@@ -4,6 +4,7 @@
     question: slapd/domain
     value: sucs.org
     vtype: string
+  notify: reconfigure slapd
 
 - name: configure openldap org name
   debconf:
@@ -11,6 +12,7 @@
     question: shared/organization
     value: sucs
     vtype: string
+  notify: reconfigure slapd
 
 - name: configure openldap password p1/2
   debconf:
@@ -18,6 +20,7 @@
     question: slapd/password1
     value: {{ ldap_password }}
     vtype: password
+  notify: reconfigure slapd
 
 - name: configure openldap password p2/2
   debconf:
@@ -25,6 +28,7 @@
     question: slapd/password2
     value: {{ ldap_password }}
     vtype: password
+  notify: reconfigure slapd
 
 - name: configure openldap backend
   debconf:
@@ -32,6 +36,7 @@
     question: slapd/backend
     value: MDB
     vtype: select
+  notify: reconfigure slapd
 
 - name: configure openldap v2 binding setting
   debconf:
@@ -39,6 +44,7 @@
     question: slapd/allow_ldap_v2
     value: false
     vtype: select
+  notify: reconfigure slapd
 
 - name: install the latest version of slapd and ldap-utils
   package:
@@ -51,4 +57,5 @@
 - name: deploy ldap.conf file
   template:
     src: ldap.conf.j2
-    dest: /etc/ldap/ldap.conf
\ No newline at end of file
+    dest: /etc/ldap/ldap.conf
+  notify: restart slapd
\ No newline at end of file



View it on GitLab: https://projects.sucs.org/sucs/sucs/commit/c372ce2a4c13252972b22e3a3cdad73b4b66c5d7
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/devel/attachments/20170108/7dec9804/attachment-0001.html>


More information about the Devel mailing list