diff options
Diffstat (limited to 'roles/common-LDAP')
-rw-r--r-- | roles/common-LDAP/tasks/main.yml | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/roles/common-LDAP/tasks/main.yml b/roles/common-LDAP/tasks/main.yml index a8c784d..aff0e58 100644 --- a/roles/common-LDAP/tasks/main.yml +++ b/roles/common-LDAP/tasks/main.yml @@ -1,31 +1,31 @@ # XXX If #742056 gets fixed, we should preseed slapd to use peercreds as # RootDN once the fix enters stable. - name: Install OpenLDAP apt: pkg={{ item }} with_items: - slapd - ldap-utils - ldapvi - db-util - python-ldap - # for the 'slapd2_' munin plugin + # for the 'slapd2' munin plugin - libnet-ldap-perl - libauthen-sasl-perl - name: Configure slapd template: src=etc/default/slapd.j2 dest=/etc/default/slapd owner=root group=root mode=0644 register: r1 notify: - Restart slapd - name: Create directory /etc/ldap/ssl file: path=/etc/ldap/ssl state=directory owner=root group=root mode=0755 tags: - genkey @@ -120,41 +120,32 @@ # We assume a clean (=stock) cn=config - name: Configure the LDAP database openldap: target=etc/ldap/database.ldif.j2 local=template # On read-only replicates, you might have to temporarily switch back to # read-write, delete the SyncRepl, and delete the DN manually: # sudo ldapdelete -Y EXTERNAL -H ldapi:// cn=admin,dc=fripost,dc=org - name: Remove cn=admin,dc=fripost,dc=org openldap: name="cn=admin,dc=fripost,dc=org" delete=entry - name: Remove the rootDN under the 'config' database openldap: name="olcDatabase={0}config,cn=config" delete=olcRootDN,olcRootPW - name: Copy /usr/local/sbin/slapcat-all.sh copy: src=usr/local/sbin/slapcat-all.sh dest=/usr/local/sbin/slapcat-all.sh owner=root group=root mode=0755 -- name: Install 'slapd2_' Munin wildcard plugin - # we don't install 'slapd_' because it doesn't support SASL binds - file: src=/usr/local/share/munin/plugins/slapd2_ - dest=/etc/munin/plugins/slapd2_{{ item }} +- name: Install 'slapd2' Munin plugin + # we don't install 'slapd_' because it doesn't support SASL binds and + # ours is more parcimonious with LDAP connections + file: src=/usr/local/share/munin/plugins/slapd2 + dest=/etc/munin/plugins/slapd2 owner=root group=root state=link force=yes - with_items: - # sudo /usr/share/munin/plugins/slapd2_ suggest - - connections - - statistics_entries - - operations_diff - - statistics_referrals - - statistics_pdu - - waiters - - statistics_bytes - - operations tags: - munin - munin-node notify: - Restart munin-node |