Few minor changes

pull/14/head
Emilien Mantel 2015-12-01 16:35:56 +01:00
parent 17905edf30
commit 9779555ac8
4 changed files with 20 additions and 20 deletions

View File

@ -64,7 +64,7 @@ You can see many examples in: [tests/test.yml](tests/test.yml).
- `more`: (O) Add more custom infos. - `more`: (O) Add more custom infos.
- `upstream_params`: (O) Add upstream params (useful when you want to pass variables to PHP) - `upstream_params`: (O) Add upstream params (useful when you want to pass variables to PHP)
- `override_try_files`: (O) overrides default try\_files defined in template - `override_try_files`: (O) overrides default try\_files defined in template
- `manage_local_content`: (O) Boolean. Set to false if you don't want to manage local content (images, css...). This option is useless if you use proxy `template` - `manage_local_content`: (O) Boolean. Set to false if you don't want to manage local content (images, css...). This option is useless if you use `_proxy` template or `redirect_to` feature.
(O): Optional (O): Optional
(M): Mandatory (M): Mandatory
@ -72,13 +72,14 @@ You can see many examples in: [tests/test.yml](tests/test.yml).
#### Templates #### Templates
- `base`: static template - `_base`: static template
- `dokuwiki` - `_dokuwiki`
- `phalcon`: Phalcon PHP Framework - `_redirect`: should not be called explicitly
- `php`: PHP base template. Can work with many frameworks/tools - `_phalcon`: Phalcon PHP Framework
- `php_index`: Same as above. But you can only run index.php - `_php`: PHP base template. Can work with many frameworks/tools
- `proxy` - `_php_index`: Same as above. But you can only run index.php
- `wordpress` - `_proxy`
- `_wordpress`
Templates works as parent-child. Templates works as parent-child.
@ -94,7 +95,6 @@ You have many key added to vhost key:
(O) : Optional (O) : Optional
(M) : Mandatory (M) : Mandatory
### Upstream management ### Upstream management
- `nginx_upstreams`: List of dict. An upstream has few keys. See bellow. - `nginx_upstreams`: List of dict. An upstream has few keys. See bellow.
@ -114,8 +114,8 @@ You must set a `path`. For example: *192.168.0.50:8080* or *unix:/tmp/my.sock*.
All this params are optional. You should see [Nginx upstream doc](http://nginx.org/en/docs/http/ngx_http_upstream_module.html). All this params are optional. You should see [Nginx upstream doc](http://nginx.org/en/docs/http/ngx_http_upstream_module.html).
- `weight` - `weight`
- `max`fails` - `max_fails`
- `fail`timeout` - `fail_timeout`
- `backup` - `backup`
- `down` - `down`
- `route` - `route`
@ -129,9 +129,7 @@ None
Example Playbook Example Playbook
---------------- ----------------
- hosts: servers See [tests/test.yml](tests/test.yml).
roles:
- { role: HanXHX.nginx }
License License
------- -------
@ -141,4 +139,5 @@ GPLv2
Author Information Author Information
------------------ ------------------
- Twitter: https://twitter.com/hanxhx - Twitter: [@hanxhx_](https://twitter.com/hanxhx_)

View File

@ -10,7 +10,7 @@ nginx_log_dir: '/var/log/nginx'
nginx_ssl_dir: '/etc/nginx/ssl' nginx_ssl_dir: '/etc/nginx/ssl'
nginx_pid: '/run/nginx.pid' nginx_pid: '/run/nginx.pid'
nginx_resolver: nginx_resolver:
hosts: ['8.8.8.8', '8.8.4.4'] # OpenDNS hosts: ['8.8.8.8', '8.8.4.4']
valid: '300' valid: '300'
timeout: '5' timeout: '5'
nginx_error_log_level: 'warn' # http://nginx.org/en/docs/ngx_core_module.html#error_log nginx_error_log_level: 'warn' # http://nginx.org/en/docs/ngx_core_module.html#error_log
@ -25,6 +25,7 @@ nginx_dh_length: 2048
nginx_php: false nginx_php: false
nginx_php_sockets: nginx_php_sockets:
- unix_socket: "/var/run/php5-fpm.sock" - unix_socket: "/var/run/php5-fpm.sock"
nginx_upstreams: []
# #
# Nginx configuration # Nginx configuration
@ -70,5 +71,7 @@ nginx_http:
gzip_disable: '"msie6"' gzip_disable: '"msie6"'
# etag: 'off' # etag: 'off'
#
# Vhosts
#
nginx_vhosts: [] nginx_vhosts: []
nginx_upstreams: []

View File

@ -39,6 +39,3 @@
- name: INCLUDE | Vhosts configuration - name: INCLUDE | Vhosts configuration
include: vhost.yml include: vhost.yml
# TODO:
# - Python
# - Ruby (SHIT!)

View File

@ -2,6 +2,7 @@
- name: TEMPLATE | Deploy PHP upstream to Nginx - name: TEMPLATE | Deploy PHP upstream to Nginx
template: src=etc/nginx/upstream/php.conf.j2 dest=/etc/nginx/conf.d/php.conf template: src=etc/nginx/upstream/php.conf.j2 dest=/etc/nginx/conf.d/php.conf
when: nginx_php
notify: reload nginx notify: reload nginx
- name: TEMPLATE | Deploy other upstreams - name: TEMPLATE | Deploy other upstreams