jpnewman.nginx

jpnewman.nginx

Ansible角色 构建状态

这个Ansible角色用于配置nginx代理。

需求

  • Ansible 2.x

角色变量

geerlingguy.nginx

变量 描述 默认值
nginx_vhosts 对于这个封装角色保持不变。 []
nginx_remove_default_vhost 对于这个封装角色保持不变。 true

jpnewman.nginx | 默认值

变量 描述 默认值
nginx_vhost_available_path /etc/nginx/sites-available
nginx_vhost_path /etc/nginx/sites-enabled

jpnewman.nginx | 简单反向代理模板 (nginx_reverse_proxy.conf.j2)

变量 描述 默认值
nginx_vhost_filename localhost
www_redirect false
listen_ports 80
host_aliases []
max_upload_size "1024m"
host_name localhost
redirect_http false
ssl_enabled false
ssl_listen_ports []
ssl_cert_path ""
ssl_key_path ""
proxy_pass_port 8080
server_auth_method ""
nginx_log_dir "/var/log/nginx"
nginx_error_log "{{ nginx_log_dir }}/error.log"
nginx_access_log "{{ nginx_log_dir }}/access.log"
nginx_template_file nginx_reverse_proxy.conf.j2

jpnewman.nginx | 多个虚拟主机模板

变量 描述 默认值
nginx_vhosts_data
nginx_acl_rules

有关示例,请参见此角色中的以下文件:

  • test\templates\defaults\artifactory.yml
  • test\templates\defaults\drupal.yml
  • test\templates\defaults\kibana_reverse_proxy.yml
  • test\templates\defaults\multiple_vhosts.yml

自定义模板

可以通过变量 nginx_template_file 使用任何自定义模板,并将所需变量放在 host_varsgroup_vars 等中。

依赖

  • geerlingguy.nginx

示例剧本

- hosts: servers
  roles:
     - { role: jpnewman.nginx, tags: ["nginx"] }

许可证

MIT / BSD

作者信息

John Paul Newman

关于项目

Wrapper Role for geerlingguy.nginx

安装
ansible-galaxy install jpnewman.nginx
许可证
mit
下载
5.5k
拥有者
Software Engineer with DevOps working on both Windows and *nix.