diff --git a/roles/ldap_server/files/slapd_rsyslog.conf b/roles/ldap_server/files/slapd_rsyslog.conf new file mode 100644 index 0000000000000000000000000000000000000000..36000b68a6cab2651dd0b2d42fa2011e7aa8a5a1 --- /dev/null +++ b/roles/ldap_server/files/slapd_rsyslog.conf @@ -0,0 +1,2 @@ +# Log slapd messages into separate log file. +local4.* /var/log/slapd.log diff --git a/roles/ldap_server/handlers/main.yml b/roles/ldap_server/handlers/main.yml new file mode 100644 index 0000000000000000000000000000000000000000..673309cd5ee191e8f4e6f39dd6f54206955e65f5 --- /dev/null +++ b/roles/ldap_server/handlers/main.yml @@ -0,0 +1,4 @@ +--- + +- name: Restart rsyslog + service: name=rsyslog state=restarted \ No newline at end of file diff --git a/roles/ldap_server/tasks/main.yml b/roles/ldap_server/tasks/main.yml index 744f956134ce9ca7ae2a3c5fc681aa0065e2c302..110306a9a37502fce2ee3dd8b979d3c8b9c608b1 100644 --- a/roles/ldap_server/tasks/main.yml +++ b/roles/ldap_server/tasks/main.yml @@ -9,6 +9,14 @@ - name: Install slapd apt: name=slapd state=installed +- name: Enable slapd service + service: name=slapd enabled=yes state=started + +- name: Deploy system logger configuration file for slapd + copy: src=slapd_rsyslog.conf dest=/etc/rsyslog.d/slapd.conf owner=root group=root mode=0644 + notify: + - Restart rsyslog + - name: Install Python LDAP bindings apt: name=python-ldap state=installed