diff --git a/roles/ldap_server/tasks/main.yml b/roles/ldap_server/tasks/main.yml index b57194cce311b78d7d51f0c99aa6cc2607b9dea2..62a9e5e0bd7baa262dd639dd490b26b2d0a35e2c 100644 --- a/roles/ldap_server/tasks/main.yml +++ b/roles/ldap_server/tasks/main.yml @@ -20,6 +20,12 @@ - name: Install Python LDAP bindings apt: name=python-ldap state=installed +- name: Set-up LDAP server to listen on legacy SSL port + lineinfile: dest=/etc/default/slapd state=present backrefs=yes + regexp='^SLAPD_SERVICES=.*' line='SLAPD_SERVICES="ldap:/// ldaps:/// ldapi:///"' + notify: + - Restart slapd + - name: Enable slapd service on boot (workaround for systemctl broken handling of SysV) command: rcconf -on slapd register: result diff --git a/roles/mail_server/tasks/main.yml b/roles/mail_server/tasks/main.yml index f764bb54819d98488c147af23a638d28c9a4426d..c76b3712b5d1d1ac8a4efff80c6dca8335c04df7 100644 --- a/roles/mail_server/tasks/main.yml +++ b/roles/mail_server/tasks/main.yml @@ -137,11 +137,18 @@ - name: Enable ClamAV database update service (freshclam) service: name=clamav-freshclam state=started -- name: Wait for ClamAV database to be available (up to 10 minutes) - wait_for: path="{{ item }}" timeout=600 +- name: Check availability of ClamAV database files + stat: path="{{ item }}" + register: clamav_db_files with_items: - - "/var/lib/clamav/daily.cvd" - - "/var/lib/clamav/main.cvd" + - /var/lib/clamav/bytecode.cld + - /var/lib/clamav/daily.cld + - /var/lib/clamav/main.cld + +- name: Wait for ClamAV database to be available (up to 10 minutes) + wait_for: path="{{ item.item | replace('.cld', '.cvd') }}" timeout=600 + with_items: clamav_db_files.results + when: not item.stat.exists - name: Enable ClamAV daemon and milter services service: name="{{ item }}" state=started diff --git a/roles/php_website/templates/nginx_site.j2 b/roles/php_website/templates/nginx_site.j2 index a85938ce9371c77deb8d1a565f765c73c0992622..274c04354b5778a36eba711a40e3abfe732c8716 100644 --- a/roles/php_website/templates/nginx_site.j2 +++ b/roles/php_website/templates/nginx_site.j2 @@ -55,7 +55,7 @@ server { # Serve the files. location ~ /(.+) { - try_files $uri $uri/{% if php_rewrite_urls %} @php_rewrite{% endif %} =404; + try_files $uri $uri/{% if php_rewrite_urls %} @php_rewrite{% else %} =404{% endif %}; } {% if php_rewrite_urls -%}