nginx: make default vhost configurable
This commit is contained in:
parent
ce0d61bcbd
commit
e5d4ea3c18
|
@ -19,6 +19,7 @@ The **patch** part changes incrementally at each release.
|
||||||
* mysql: activate binary logs by specifying log_bin path
|
* mysql: activate binary logs by specifying log_bin path
|
||||||
* mysql: specify a custom server_id
|
* mysql: specify a custom server_id
|
||||||
* mysql: option to define as read only
|
* mysql: option to define as read only
|
||||||
|
* nginx: make default vhost configurable
|
||||||
* packweb-apache: Install zip & unzip by default
|
* packweb-apache: Install zip & unzip by default
|
||||||
* php: Install php-sqlite by default
|
* php: Install php-sqlite by default
|
||||||
* php: Don't disable putenv() by default in PHP settings
|
* php: Don't disable putenv() by default in PHP settings
|
||||||
|
|
|
@ -22,3 +22,10 @@ nginx_evolinux_default_enabled: True
|
||||||
|
|
||||||
nginx_serverstatus_suffix: ""
|
nginx_serverstatus_suffix: ""
|
||||||
nginx_serverstatus_suffix_file: "/etc/evolinux/nginx_serverstatus_suffix"
|
nginx_serverstatus_suffix_file: "/etc/evolinux/nginx_serverstatus_suffix"
|
||||||
|
|
||||||
|
nginx_force_default_template: False
|
||||||
|
nginx_default_template_regular: "evolinux-default.conf.j2"
|
||||||
|
nginx_default_template_minimal: "evolinux-default.minimal.conf.j2"
|
||||||
|
|
||||||
|
nginx_service_state: started
|
||||||
|
nginx_service_enabled: True
|
||||||
|
|
|
@ -12,9 +12,10 @@
|
||||||
|
|
||||||
- name: Copy default vhost
|
- name: Copy default vhost
|
||||||
template:
|
template:
|
||||||
src: evolinux-default.minimal.conf.j2
|
src: "{{ nginx_default_template_minimal }}"
|
||||||
dest: /etc/nginx/sites-available/evolinux-default.minimal.conf
|
dest: /etc/nginx/sites-available/evolinux-default.minimal.conf
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
force: "{{ nginx_force_default_template | default(False) }}"
|
||||||
notify: reload nginx
|
notify: reload nginx
|
||||||
tags:
|
tags:
|
||||||
- nginx
|
- nginx
|
||||||
|
|
|
@ -89,10 +89,10 @@
|
||||||
|
|
||||||
- name: nginx vhost is installed
|
- name: nginx vhost is installed
|
||||||
template:
|
template:
|
||||||
src: evolinux-default.conf.j2
|
src: "{{ nginx_default_template_regular }}"
|
||||||
dest: /etc/nginx/sites-available/evolinux-default.conf
|
dest: /etc/nginx/sites-available/evolinux-default.conf
|
||||||
mode: "0640"
|
mode: "0640"
|
||||||
force: no
|
force: "{{ nginx_force_default_template | default(False) }}"
|
||||||
notify: reload nginx
|
notify: reload nginx
|
||||||
tags:
|
tags:
|
||||||
- nginx
|
- nginx
|
||||||
|
|
|
@ -7,7 +7,15 @@
|
||||||
apt:
|
apt:
|
||||||
name: "{{ nginx_package_name }}"
|
name: "{{ nginx_package_name }}"
|
||||||
state: present
|
state: present
|
||||||
notify: restart nginx
|
tags:
|
||||||
|
- nginx
|
||||||
|
- packages
|
||||||
|
|
||||||
|
- name: Ensure nginx service is running as configured.
|
||||||
|
service:
|
||||||
|
name: nginx
|
||||||
|
state: "{{ nginx_service_state }}"
|
||||||
|
enabled: "{{ nginx_service_enabled }}"
|
||||||
tags:
|
tags:
|
||||||
- nginx
|
- nginx
|
||||||
- packages
|
- packages
|
||||||
|
|
Loading…
Reference in a new issue