apache/nginx: fix server-status replacement
This commit is contained in:
parent
992f279064
commit
9a489ccf29
|
@ -46,10 +46,6 @@
|
||||||
tags:
|
tags:
|
||||||
- apache
|
- apache
|
||||||
|
|
||||||
- include: server_status.yml
|
|
||||||
tags:
|
|
||||||
- apache
|
|
||||||
|
|
||||||
- name: Copy Apache defaults config file
|
- name: Copy Apache defaults config file
|
||||||
copy:
|
copy:
|
||||||
src: evolinux-defaults.conf
|
src: evolinux-defaults.conf
|
||||||
|
@ -118,6 +114,10 @@
|
||||||
tags:
|
tags:
|
||||||
- apache
|
- apache
|
||||||
|
|
||||||
|
- include: server_status.yml
|
||||||
|
tags:
|
||||||
|
- apache
|
||||||
|
|
||||||
- name: is umask already present?
|
- name: is umask already present?
|
||||||
command: "grep -E '^umask ' /etc/apache2/envvars"
|
command: "grep -E '^umask ' /etc/apache2/envvars"
|
||||||
failed_when: False
|
failed_when: False
|
||||||
|
|
|
@ -43,13 +43,13 @@
|
||||||
- name: add server-status suffix in default site index if missing
|
- name: add server-status suffix in default site index if missing
|
||||||
replace:
|
replace:
|
||||||
dest: /var/www/index.html
|
dest: /var/www/index.html
|
||||||
regexp: '"/server-status"'
|
regexp: '"/server-status-?"'
|
||||||
replace: '"/server-status-{{ apache_serverstatus_suffix }}"'
|
replace: '"/server-status-{{ apache_serverstatus_suffix }}"'
|
||||||
|
|
||||||
- name: add server-status suffix in default VHost
|
- name: add server-status suffix in default VHost
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/apache2/sites-available/000-evolinux-default.conf
|
dest: /etc/apache2/sites-available/000-evolinux-default.conf
|
||||||
regexp: '<Location /server-status>'
|
regexp: '<Location /server-status-?>'
|
||||||
replace: '<Location /server-status-{{ apache_serverstatus_suffix }}>'
|
replace: '<Location /server-status-{{ apache_serverstatus_suffix }}>'
|
||||||
notify: reload apache
|
notify: reload apache
|
||||||
|
|
||||||
|
|
|
@ -87,10 +87,6 @@
|
||||||
tags:
|
tags:
|
||||||
- nginx
|
- nginx
|
||||||
|
|
||||||
- include: server_status.yml
|
|
||||||
tags:
|
|
||||||
- nginx
|
|
||||||
|
|
||||||
- name: nginx vhost is installed
|
- name: nginx vhost is installed
|
||||||
template:
|
template:
|
||||||
src: evolinux-default.conf.j2
|
src: evolinux-default.conf.j2
|
||||||
|
@ -112,6 +108,10 @@
|
||||||
tags:
|
tags:
|
||||||
- nginx
|
- nginx
|
||||||
|
|
||||||
|
- include: server_status.yml
|
||||||
|
tags:
|
||||||
|
- nginx
|
||||||
|
|
||||||
# - block:
|
# - block:
|
||||||
# - name: generate random string for phpmyadmin suffix
|
# - name: generate random string for phpmyadmin suffix
|
||||||
# command: "apg -a 1 -M N -n 1"
|
# command: "apg -a 1 -M N -n 1"
|
||||||
|
|
|
@ -44,12 +44,12 @@
|
||||||
- name: add server-status suffix in default site index if missing
|
- name: add server-status suffix in default site index if missing
|
||||||
replace:
|
replace:
|
||||||
dest: /var/www/index.html
|
dest: /var/www/index.html
|
||||||
regexp: '"/nginx_status"'
|
regexp: '"/nginx_status-?"'
|
||||||
replace: '"/nginx_status-{{ nginx_serverstatus_suffix }}"'
|
replace: '"/nginx_status-{{ nginx_serverstatus_suffix }}"'
|
||||||
|
|
||||||
- name: add server-status suffix in default VHost
|
- name: add server-status suffix in default VHost
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/nginx/sites-available/evolinux-default.conf
|
dest: /etc/nginx/sites-available/evolinux-default.conf
|
||||||
regexp: 'location /nginx_status {'
|
regexp: 'location /nginx_status-? {'
|
||||||
replace: 'location /nginx_status-{{ nginx_serverstatus_suffix }} {'
|
replace: 'location /nginx_status-{{ nginx_serverstatus_suffix }} {'
|
||||||
notify: reload nginx
|
notify: reload nginx
|
||||||
|
|
Loading…
Reference in New Issue