Mirror HanXHX/ansible-nginx dari GitHub.
 
 
Go to file
Emilien Mantel 4bfca1652c Add application/javascript to gzip_types 2015-07-17 11:36:11 +02:00
defaults Add application/javascript to gzip_types 2015-07-17 11:36:11 +02:00
files/web Moving files 2015-07-15 15:42:32 +02:00
handlers Vhost static OK (dirty) 2015-07-15 15:18:51 +02:00
meta Add meta/main.yml 2015-07-15 16:31:44 +02:00
tasks Don't create directory if root specified 2015-07-16 16:31:21 +02:00
templates/etc/nginx Minor fixes 2015-07-16 16:26:40 +02:00
tests Add files to test vhosts 2015-07-16 16:24:44 +02:00
vars Vhost static OK (dirty) 2015-07-15 15:18:51 +02:00
.gitignore Init repo 2015-07-15 12:14:39 +02:00
LICENSE Initial commit 2015-07-15 12:12:06 +02:00
README.md Add README 2015-07-16 11:44:25 +02:00
Vagrantfile Init repo 2015-07-15 12:14:39 +02:00

README.md

Nginx for Debian Ansible role

Install and configure Nginx on Debian

Requirements

None.

Role Variables

  • nginx_apt_package: APT nginx package (try: apt-cache search ^nginx)
  • nginx_root: root directory where you want to have your files
  • nginx_log_dir: log directory (if you change it, don't forget to change logrotate config)
  • nginx_ssl_dir: directory where you install your SSL/TLS keys
  • nginx_resolver: list of DNS resolver (default: OpenDNS)
  • nginx_error_log_level: default log level
  • nginx_dh_length: DH key length (default is 2048)

PHP

  • nginx_php: boolean if you need to preconfigure PHP (default: false)
  • nginx_php_sockets: list of //sockets//

You should see Nginx upstream module doc.

Socket:

  • unix_socket
  • host
  • port
  • weight
  • max_fails
  • fail_timeout

Nginx Configuration

  • nginx_user
  • nginx_worker_processes
  • nginx_pid
  • nginx_events: key/value in events block
  • nginx_http: key/value in http block

Vhost management

  • nginx_vhosts:

You need at least : "name". you can configure many templates (and yours !).

Few tips:

  • if you need another root (glpi, phpmyadmin... etc), you can specify "root"
  • you can use your own templates, you must keep the same directory organization
  • you should see COMMON.j2 to see all abilities

You can see many examples in: [tests/test.yml].

Dependencies

None

Example Playbook

- hosts: servers
  roles:
     - { role: HanXHX.nginx }

License

GPLv2

Author Information