forked from evolix/ansible-roles
apache/nginx: remove compatibility mode
This commit is contained in:
parent
c77bc14e95
commit
9527aff68a
|
@ -1,11 +1,5 @@
|
|||
---
|
||||
|
||||
- name: "Rename private_ipaddr_whitelist if present"
|
||||
command: "mv /etc/apache2/private_ipaddr_whitelist.conf /etc/apache2/ipaddr_whitelist.conf"
|
||||
args:
|
||||
removes: /etc/apache2/private_ipaddr_whitelist.conf
|
||||
creates: /etc/apache2/ipaddr_whitelist.conf
|
||||
|
||||
- name: Init ipaddr_whitelist.conf file
|
||||
copy:
|
||||
src: ipaddr_whitelist.conf
|
||||
|
|
|
@ -37,32 +37,6 @@
|
|||
tags:
|
||||
- nginx
|
||||
|
||||
### Compatibility : change private_ipaddr_whitelist to ipaddr_whitelist ########
|
||||
|
||||
- name: "Rename private_ipaddr_whitelist if present"
|
||||
command: "mv /etc/nginx/snippets/private_ipaddr_whitelist /etc/nginx/snippets/ipaddr_whitelist"
|
||||
args:
|
||||
removes: /etc/nginx/snippets/private_ipaddr_whitelist
|
||||
creates: /etc/nginx/snippets/ipaddr_whitelist
|
||||
|
||||
- name: "search vhosts with private_ipaddr_whitelist"
|
||||
command: "grep -lr private_ipaddr_whitelist /etc/nginx/sites-available/"
|
||||
register: vhosts_with_private
|
||||
changed_when: False
|
||||
failed_when: False
|
||||
check_mode: no
|
||||
|
||||
- name: "change inclusion of ipaddr_whitelist in default vhost"
|
||||
replace:
|
||||
dest: /etc/nginx/sites-available/evolinux-default.conf
|
||||
regexp: 'include /etc/nginx/snippets/private_ipaddr_whitelist;'
|
||||
replace: 'include /etc/nginx/snippets/ipaddr_whitelist;'
|
||||
notify: reload nginx
|
||||
with_items: "{{ vhosts_with_private.stdout_lines }}"
|
||||
when: vhosts_with_private.rc == 0
|
||||
|
||||
################################################################################
|
||||
|
||||
# TODO: verify that those permissions are correct :
|
||||
# not too strict for ipaddr_whitelist
|
||||
# and not too loose for private_htpasswd
|
||||
|
|
Loading…
Reference in a new issue