pylabs.nginx
nginx
安装 Nginx 包
角色变量
nginx_cache_path: 缓存路径 (默认值: /var/cache/nginx)
nginx_proxy_cache_enabled: 启用代理缓存 (默认值: false)
nginx_proxy_cache_path: 代理缓存路径 (默认值: "{{ nginx_cache_path }} levels=1:2 keys_zone=proxy_cache:10m inactive=1d max_size=10g;")
nginx_proxy_cache_key: 代理缓存键 (默认值: "$scheme$proxy_host$uri$is_args$args;")
nginx_uwsgi_cache_enabled: 启用 uWSGI 缓存 (默认值: false)
nginx_uwsgi_cache_path: uWSGI 缓存路径 (默认值: "{{ nginx_cache_path }} levels=1:2 keys_zone=uwsgi_cache:10m inactive=1d max_size=10g;")
nginx_uwsgi_cache_key: uWSGI 缓存键 (默认值: "$scheme$proxy_host$uri$is_args$args;")
依赖项
- pylabs.sysbase
示例剧本
- hosts: 服务器
vars:
nginx_cache_path: "/var/cache/nginx"
nginx_uwsgi_cache_enabled: yes
nginx_uwsgi_cache_path: "{{ nginx_cache_path }} levels=1:2 keys_zone=uwsgi_cache:10m inactive=1d max_size=10g;"
nginx_uwsgi_cache_key: "$scheme$proxy_host$uri$is_args$args;"
roles:
- role: pylabs.nginx
许可证
MIT
作者信息
William Wu