Changeset - 97be416e882e
[Not reviewed]
0 3 0
Branko Majic (branko) - 8 years ago 2016-06-07 19:48:10
branko@majic.rs
MAR-56: Set-up slapd to listen on legacy TLS port. Fixed ClamAV tasks used for waiting for ClamAV database to be donwloaded. Fixed some handling of rewrite rules for the PHP websites.
3 files changed with 18 insertions and 5 deletions:
0 comments (0 inline, 0 general)
roles/ldap_server/tasks/main.yml
Show inline comments
 
@@ -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
roles/mail_server/tasks/main.yml
Show inline comments
 
@@ -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
roles/php_website/templates/nginx_site.j2
Show inline comments
 
@@ -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 -%}
0 comments (0 inline, 0 general)