Merge pull request #40 from nginxinc/(feature)/toggle-nginx-unit-install

Add nginx_enable variable
This commit is contained in:
Alessandro Fael Garcia 2018-07-11 18:01:00 -07:00 committed by GitHub
commit 792409981e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 56 additions and 42 deletions

View File

@ -133,7 +133,7 @@ script:
| grep -q 'changed=0.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1)
- 'sudo docker exec "$(cat ${container_id})" curl http://localhost/'
- 'if [${playbook} != "unit"]; then sudo docker exec "$(cat ${container_id})" curl http://localhost/; fi'
- 'sudo docker rm -f "$(cat ${container_id})"'
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/

View File

@ -102,6 +102,10 @@ Role Variables
This role has multiple variables. The defaults for all these variables are the following:
---
# Install NGINX.
# Default is true.
nginx_enable: true
# Specify which version of NGINX you want to install.
# Options are 'opensource' or 'plus'.
# Default is 'opensource'.
@ -131,12 +135,6 @@ This role has multiple variables. The defaults for all these variables are the f
# Default is mainline.
branch: mainline
# Install NGINX Unit and NGINX Unit modules.
# Use a list of supported NGINX Unit modules.
# Default is false.
unit_enable: false
unit_modules: null
# Install NGINX JavaScript, Perl, ModSecurity WAF (NGINX Plus only), GeoIP, Image-Filter, RTMP Media Streaming, and/or XSLT modules.
# Default is false.
modules:
@ -195,6 +193,12 @@ This role has multiple variables. The defaults for all these variables are the f
stream_template_enable: false
stream_template_listen: 12345
# Install NGINX Unit and NGINX Unit modules.
# Use a list of supported NGINX Unit modules.
# Default is false.
unit_enable: false
unit_modules: null
Dependencies
------------

View File

@ -1,4 +1,8 @@
---
# Install NGINX.
# Default is true.
nginx_enable: true
# Specify which version of NGINX you want to install.
# Options are 'opensource' or 'plus'.
# Default is 'opensource'.
@ -28,12 +32,6 @@ nginx_repository:
# Default is mainline.
branch: mainline
# Install NGINX Unit and NGINX Unit modules.
# Use a list of supported NGINX Unit modules.
# Default is false.
unit_enable: false
unit_modules: null
# Install NGINX JavaScript, Perl, ModSecurity WAF (NGINX Plus only), GeoIP, Image-Filter, RTMP Media Streaming, and/or XSLT modules.
# Default is false.
modules:
@ -91,3 +89,9 @@ http_template_listen: 80
http_template_server_name: localhost
stream_template_enable: false
stream_template_listen: 12345
# Install NGINX Unit and NGINX Unit modules.
# Use a list of supported NGINX Unit modules.
# Default is false.
unit_enable: false
unit_modules: null

View File

@ -5,6 +5,9 @@
- import_tasks: keys/rpm-key.yml
when: ansible_os_family == "RedHat" or ansible_os_family == "Suse"
- name: "(Install: Debian/Ubuntu/CentOS/RedHat/FreeBSD) Install NGINX"
block:
- import_tasks: opensource/install-oss.yml
when: type == "opensource"
@ -47,5 +50,7 @@
- import_tasks: amplify/install-amplify.yml
when: amplify_enable and amplify_key is defined and amplify_key
when: nginx_enable
- import_tasks: unit/install-unit.yml
when: unit_enable

View File

@ -1,5 +1,5 @@
---
- name: ""
- name: "(Install: Debian/Ubuntu/CentOS/RedHat/FreeBSD) Install NGINX"
block:
- import_tasks: setup-debian.yml

View File

@ -5,6 +5,7 @@
roles:
- ansible-role-nginx
vars:
nginx_enable: false
unit_enable: true
unit_modules:
- unit-php