Add README

pull/2/head
Emilien Mantel 2015-07-16 11:44:25 +02:00
parent 596aaefb31
commit 57882393b8
1 changed files with 53 additions and 11 deletions

View File

@ -1,38 +1,80 @@
Role Name
=========
Nginx for Debian Ansible role
=============================
A brief description of the role goes here.
Install and configure Nginx on Debian
Requirements
------------
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
None.
Role Variables
--------------
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
- `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](http://nginx.org/en/docs/http/ngx_http_upstream_module.html).
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
------------
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
None
Example Playbook
----------------
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- { role: username.rolename, x: 42 }
- { role: HanXHX.nginx }
License
-------
BSD
GPLv2
Author Information
------------------
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
- You can find many other roles in my GitHub "lab": https://github.com/HanXHX/my-ansible-playbooks
- All issues, pull-request are welcome :)