mirror of
https://github.com/geerlingguy/ansible-role-nginx.git
synced 2024-09-29 04:17:27 +02:00
parent
45b749af83
commit
fdc9a7da78
@ -12,7 +12,7 @@ None.
|
|||||||
|
|
||||||
## Role Variables
|
## Role Variables
|
||||||
|
|
||||||
Available variables are listed below, along with default values (see `vars/main.yml` and `defaults/main.yml`):
|
Available variables are listed below, along with default values (see `defaults/main.yml`):
|
||||||
|
|
||||||
nginx_remove_default_vhost: false
|
nginx_remove_default_vhost: false
|
||||||
nginx_default_vhost_path: /etc/nginx/sites-enabled/default
|
nginx_default_vhost_path: /etc/nginx/sites-enabled/default
|
||||||
@ -21,7 +21,7 @@ Whether to remove the 'default' virtualhost configuration supplied by Nginx. Use
|
|||||||
|
|
||||||
nginx_user: "nginx"
|
nginx_user: "nginx"
|
||||||
|
|
||||||
The user under which Nginx will run.
|
The user under which Nginx will run. Defaults to `nginx` for RedHat, and `www-data` for Debian.
|
||||||
|
|
||||||
nginx_worker_processes: "1"
|
nginx_worker_processes: "1"
|
||||||
nginx_worker_connections: "8192"
|
nginx_worker_connections: "8192"
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
---
|
---
|
||||||
nginx_user: "nginx"
|
|
||||||
nginx_worker_processes: "1"
|
nginx_worker_processes: "1"
|
||||||
nginx_worker_connections: "8192"
|
nginx_worker_connections: "8192"
|
||||||
nginx_client_max_body_size: "64m"
|
nginx_client_max_body_size: "64m"
|
||||||
|
@ -1,4 +1,14 @@
|
|||||||
---
|
---
|
||||||
|
# Variable setup.
|
||||||
|
- name: Include OS-specific variables.
|
||||||
|
include_vars: "{{ ansible_os_family }}.yml"
|
||||||
|
|
||||||
|
- name: Define nginx_user.
|
||||||
|
set_fact:
|
||||||
|
nginx_user: "{{ __nginx_user }}"
|
||||||
|
when: nginx_user is not defined
|
||||||
|
|
||||||
|
# Nginx setup.
|
||||||
- name: Enable nginx repo (RedHat).
|
- name: Enable nginx repo (RedHat).
|
||||||
copy: >
|
copy: >
|
||||||
src=nginx.repo
|
src=nginx.repo
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
---
|
---
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
remote_user: root
|
remote_user: root
|
||||||
vars:
|
|
||||||
nginx_user: root
|
|
||||||
roles:
|
roles:
|
||||||
- ansible-role-nginx
|
- ansible-role-nginx
|
||||||
|
2
vars/Debian.yml
Normal file
2
vars/Debian.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
__nginx_user: "www-data"
|
2
vars/RedHat.yml
Normal file
2
vars/RedHat.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
__nginx_user: "nginx"
|
@ -1 +0,0 @@
|
|||||||
---
|
|
Loading…
Reference in New Issue
Block a user