r/nginx: Fix applying on Buildroot systems
There are a few minor differences between the way Fedora and Buildroot package *nginx*: * Fedora uses a user named *nginx* while buildroot uses *www-data* * Buildroot uses a Debian-like configuration layout (with `sites-enabled` and `modules-enabled` directories) This commit adjusts the *nginx* Ansible role to compensate for these differences, eschewing Buildroot's configuration layout for the one used by Fedora/Red Hat.btop
parent
0785fda26b
commit
7e08fb66f7
|
@ -55,6 +55,17 @@
|
||||||
- 'certs/nginx/{{ inventory_hostname }}/ca.crt'
|
- 'certs/nginx/{{ inventory_hostname }}/ca.crt'
|
||||||
notify: reload nginx
|
notify: reload nginx
|
||||||
|
|
||||||
|
- name: ensure nginx configuration directories exist
|
||||||
|
file:
|
||||||
|
path: '{{ item }}'
|
||||||
|
mode: u=rwx,go=rx
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
state: directory
|
||||||
|
loop:
|
||||||
|
- /etc/nginx
|
||||||
|
- /etc/nginx/conf.d
|
||||||
|
- /etc/nginx/default.d
|
||||||
- name: ensure nginx is configured
|
- name: ensure nginx is configured
|
||||||
template:
|
template:
|
||||||
src: nginx.conf.j2
|
src: nginx.conf.j2
|
||||||
|
@ -70,6 +81,7 @@
|
||||||
state: enabled
|
state: enabled
|
||||||
permanent: no
|
permanent: no
|
||||||
immediate: yes
|
immediate: yes
|
||||||
|
when: host_uses_firewalld|d(true)
|
||||||
with_items:
|
with_items:
|
||||||
- http
|
- http
|
||||||
- https
|
- https
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# * Official English Documentation: http://nginx.org/en/docs/
|
# * Official English Documentation: http://nginx.org/en/docs/
|
||||||
# * Official Russian Documentation: http://nginx.org/ru/docs/
|
# * Official Russian Documentation: http://nginx.org/ru/docs/
|
||||||
|
|
||||||
user nginx;
|
user {{ nginx_user }};
|
||||||
worker_processes auto;
|
worker_processes auto;
|
||||||
error_log /var/log/nginx/error.log;
|
error_log /var/log/nginx/error.log;
|
||||||
{% if nginx_log_syslog|bool %}
|
{% if nginx_log_syslog|bool %}
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
|
nginx_user: nginx
|
||||||
nginx_default_ssl_ciphers:
|
nginx_default_ssl_ciphers:
|
||||||
- PROFILE=SYSTEM
|
- PROFILE=SYSTEM
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
|
nginx_user: nginx
|
||||||
nginx_default_ssl_ciphers:
|
nginx_default_ssl_ciphers:
|
||||||
- PROFILE=SYSTEM
|
- PROFILE=SYSTEM
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
nginx_user: www-data
|
||||||
nginx_default_ssl_ciphers:
|
nginx_default_ssl_ciphers:
|
||||||
- HIGH
|
- HIGH
|
||||||
- '!aNULL'
|
- '!aNULL'
|
||||||
|
|
Loading…
Reference in New Issue