vundb / ansible-role-nginx-site
用于配置nginx服务站点的Ansible角色。
1.2.0
2017-03-19 19:52 UTC
Requires
- composer/installers: ~1.0
This package is auto-updated.
Last update: 2024-09-10 23:20:12 UTC
README
用于配置nginx服务站点的Ansible角色。
需求
无。
角色变量
-
nginx_user
: 运行服务的系统用户名称。默认值是 "nginx" -
nginx_group
: 运行服务的系统组名称。默认值是 "nginx" -
nginx_services
: 在配置更改时需要重启的服务数组。默认值是 ["nginx"] -
nginx_sites
: 站点配置数组。也称为服务器块。参见 默认变量文件
依赖
无。
示例剧本
- hosts: all
roles:
- role: vundb-nginx-site
nginx_sites:
- label: "example.com"
listen_hosts: ["80"]
server_names: ["example.com"]
access_log: "/var/log/nginx/example.com.access_log"
error_log: "/var/log/nginx/example.com.error_log"
root: "/var/www/example.com"
许可
MIT