Browse Source

apache/nginx: fix server-status replacement

pull/47/head
parent
commit
9a489ccf29
4 changed files with 12 additions and 12 deletions
  1. +4
    -4
      apache/tasks/main.yml
  2. +2
    -2
      apache/tasks/server_status.yml
  3. +4
    -4
      nginx/tasks/main_regular.yml
  4. +2
    -2
      nginx/tasks/server_status.yml

+ 4
- 4
apache/tasks/main.yml View File

@@ -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


+ 2
- 2
apache/tasks/server_status.yml View File

@@ -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: '<Location /server-status>'
regexp: '<Location /server-status-?>'
replace: '<Location /server-status-{{ apache_serverstatus_suffix }}>'
notify: reload apache



+ 4
- 4
nginx/tasks/main_regular.yml View File

@@ -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"


+ 2
- 2
nginx/tasks/server_status.yml View File

@@ -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

Loading…
Cancel
Save