diff --git a/apache/tasks/main.yml b/apache/tasks/main.yml index 19858569..a461a8d4 100644 --- a/apache/tasks/main.yml +++ b/apache/tasks/main.yml @@ -46,10 +46,6 @@ tags: - apache -- include: server_status.yml - tags: - - apache - - name: Copy Apache defaults config file copy: src: evolinux-defaults.conf @@ -118,6 +114,10 @@ tags: - apache +- include: server_status.yml + tags: + - apache + - name: is umask already present? command: "grep -E '^umask ' /etc/apache2/envvars" failed_when: False diff --git a/apache/tasks/server_status.yml b/apache/tasks/server_status.yml index 7ef8087c..6497966b 100644 --- a/apache/tasks/server_status.yml +++ b/apache/tasks/server_status.yml @@ -43,13 +43,13 @@ - name: add server-status suffix in default site index if missing replace: dest: /var/www/index.html - regexp: '"/server-status"' + regexp: '"/server-status-?"' replace: '"/server-status-{{ apache_serverstatus_suffix }}"' - name: add server-status suffix in default VHost replace: dest: /etc/apache2/sites-available/000-evolinux-default.conf - regexp: '' + regexp: '' replace: '' notify: reload apache diff --git a/nginx/tasks/main_regular.yml b/nginx/tasks/main_regular.yml index f3c31d56..99080a5e 100644 --- a/nginx/tasks/main_regular.yml +++ b/nginx/tasks/main_regular.yml @@ -87,10 +87,6 @@ tags: - nginx -- include: server_status.yml - tags: - - nginx - - name: nginx vhost is installed template: src: evolinux-default.conf.j2 @@ -112,6 +108,10 @@ tags: - nginx +- include: server_status.yml + tags: + - nginx + # - block: # - name: generate random string for phpmyadmin suffix # command: "apg -a 1 -M N -n 1" diff --git a/nginx/tasks/server_status.yml b/nginx/tasks/server_status.yml index aed55b68..14bb3fe5 100644 --- a/nginx/tasks/server_status.yml +++ b/nginx/tasks/server_status.yml @@ -44,12 +44,12 @@ - name: add server-status suffix in default site index if missing replace: dest: /var/www/index.html - regexp: '"/nginx_status"' + regexp: '"/nginx_status-?"' replace: '"/nginx_status-{{ nginx_serverstatus_suffix }}"' - name: add server-status suffix in default VHost replace: dest: /etc/nginx/sites-available/evolinux-default.conf - regexp: 'location /nginx_status {' + regexp: 'location /nginx_status-? {' replace: 'location /nginx_status-{{ nginx_serverstatus_suffix }} {' notify: reload nginx