vundb/ansible-role-nginx-site

Ansible role to configure sites for nginx service.

1.2.0 2017-03-19 19:52 UTC

This package is auto-updated.

Last update: 2024-04-10 22:26:31 UTC


README

Ansible role to configure sites for nginx service.

Requirements

None.

Role Variables

  • nginx_user: Name of system user to run service with. Default value is "nginx"

  • nginx_group: Name of system group to run service with. Default value is "nginx"

  • nginx_services: Array with services to be restarted on configuration changes. Default value is ["nginx"]

  • nginx_sites: Array with site configuration. Also called server blocks. See default vars file

Dependencies

None.

Example Playbook

- 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"

License

MIT

Author Information

  • You can find more roles in my GitHub channel vundb
  • Follow me on Twitter @vundb