[SUCS Devel] [Git][sucs/sucs][master] Start working on the role(s) to deploy the ldap server

Imran Hussain imranh at sucs.org
Sat Jan 7 20:22:16 GMT 2017


Imran Hussain pushed to branch master at sucs / SUCS


Commits:
d484c322 by Imran Hussain at 2017-01-07T20:23:42+00:00
Start working on the role(s) to deploy the ldap server

- - - - -


2 changed files:

- + ansible/roles/ldap-server/tasks/main.yml
- + ansible/roles/ldap-server/templates/ldap.conf.j2


Changes:

=====================================
ansible/roles/ldap-server/tasks/main.yml
=====================================
--- /dev/null
+++ b/ansible/roles/ldap-server/tasks/main.yml
@@ -0,0 +1,54 @@
+- name: configure openldap domain
+  debconf:
+    name: slapd
+    question: slapd/domain
+    value: sucs.org
+    vtype: string
+
+- name: configure openldap org name
+  debconf:
+    name: slapd
+    question: shared/organization
+    value: sucs
+    vtype: string
+
+- name: configure openldap password p1/2
+  debconf:
+    name: slapd
+    question: slapd/password1
+    value: {{ ldap_password }}
+    vtype: password
+
+- name: configure openldap password p2/2
+  debconf:
+    name: slapd
+    question: slapd/password2
+    value: {{ ldap_password }}
+    vtype: password
+
+- name: configure openldap backend
+  debconf:
+    name: slapd
+    question: slapd/backend
+    value: MDB
+    vtype: select
+
+- name: configure openldap v2 binding setting
+  debconf:
+    name: slapd
+    question: slapd/allow_ldap_v2
+    value: false
+    vtype: select
+
+- name: install the latest version of slapd and ldap-utils
+  package:
+    name: {{ item }}
+    state: latest
+  with_items:
+    - slapd
+    - ldap-utils
+
+- name: deploy ldap.conf file
+  template:
+    src: ldap.conf.j2
+    dest: /etc/ldap/ldap.conf
\ No newline at end of file


=====================================
ansible/roles/ldap-server/templates/ldap.conf.j2
=====================================
--- /dev/null
+++ b/ansible/roles/ldap-server/templates/ldap.conf.j2
@@ -0,0 +1,18 @@
+{{ ansible_managed }}
+
+#
+# LDAP Defaults
+#
+
+# See ldap.conf(5) for details
+# This file should be world readable but not world writable.
+
+BASE   dc=sucs,dc=org
+URI    ldap://127.0.0.1
+
+#SIZELIMIT      12
+#TIMELIMIT      15
+#DEREF          never
+
+# TLS certificates (needed for GnuTLS)
+TLS_CACERT      /etc/ssl/certs/ca-certificates.crt
\ No newline at end of file



View it on GitLab: https://projects.sucs.org/sucs/sucs/commit/d484c3229dd9cbd23ca6cc1bd72e0e9bfa620abb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/devel/attachments/20170107/160a73f5/attachment-0001.html>


More information about the Devel mailing list