Commit Graph

151 Commits

Author SHA1 Message Date
Alessandro Fael Garcia
3b6c744166
Delete NGINX Plus repository when license is deleted (#204)
This fixes a bug when only the license is deleted, making system updates fail since the NGINX Plus repository is still within the repositories list yet there is no license to authenticate to the repository
2019-12-11 12:45:12 -08:00
Alessandro Fael Garcia
8baa94e736
Add option to use/update to the latest version of NGINX (#202)
Resolves #132
2019-12-06 16:48:15 -08:00
Alessandro Fael Garcia
e4e68376f5 Add testing and use correct repository for CentOS/RHEL 8 2019-11-26 22:12:09 +01:00
Vladimir Botka
31beec2e7b NGINX Plus separate installation of Linux and FreeBSD (#193)
* Added variable nginx_plus_linux_families: ['Alpine', 'Debian', 'RedHat', 'Suse']
* Added variable nginx_plus_bsd_systems: ['FreeBSD']
* Added variable nginx_freebsd_extra_packages: ['security/ca_root_nss']
* Installation of Linux moved to install-plus-linux.yml
* Installation of FreeBSD moved to install-plus-bsd.yml
* Installation of nginx_freebsd_extra_packages moved to tasks/prerequisites/setup-freebsd.yml
* Installation of NGINX Plus tested with FreeBSD 12.0; Lint passed
2019-11-26 14:15:55 +01:00
Seena Fallah
1771878e9e Add multiple servers for reverse proxy template (#194)
* Change custom options to better reflect multiple server support
2019-11-26 00:46:03 +01:00
Alessandro Fael Garcia
f6c48c12d6
Add Alpine tests to all molecule scenarios (#191)
* Use distro specific Ansible modules to install NGINX

* Install NGINX directly in Alpine distributions from the official repository to avoid naming conflicts

* Set travis_wait parameter to max timeout setting
2019-11-24 02:10:55 +01:00
Alessandro Fael Garcia
59e0170313
Fix OSS Alpine installation and add Alpine test coverage (#190) 2019-11-22 15:52:34 +01:00
Alessandro Fael Garcia
16f21c5c7c
Optimise testing and fix CentOS GeoIP module (#185)
* Use slim Debian images for testing 
* Update `volume_mounts` to `volumes`
* Update and move default Dockerfile
* Use normal centos image
* Add epel-release prerequisite to CentOS modules
* Separate module and template tests
2019-11-21 19:53:30 +01:00
Vladimir Botka
fd88f4cb22 Tags added to main.yml (#186)
* Tags added to each import_tasks in main.yml
2019-11-19 15:47:29 +01:00
Vladimir Botka
27d94628bd Separate installation of Linux and BSD (#182)
* Added variable nginx_linux_families: ['Debian', 'RedHat', 'Suse']
* Added variable nginx_bsd_systems: ['FreeBSD', 'NetBSD', 'OpenBSD', 'DragonFlyBSD', 'HardenedBSD']
* Handler started only in "not ansible_check_mode" to avoid --check failure when service hes not been installed yet
* Installation of Linux moved to install-oss-linux.yml
* Installation of BSD moved to install-oss-bsd.yml
* File setup-freebsd.yml deleted
2019-11-18 21:09:10 +01:00
Alessandro Fael Garcia
78c21d4346
Add variable to set location of NGINX status conf file (#184) 2019-11-18 17:14:00 +01:00
Alessandro Fael Garcia
41aeda300d
Add option to specify the version of NGINX to install (#177)
And remove outdated Debian Jessie Molecule tests
2019-11-03 15:07:38 +01:00
Alessandro Fael Garcia
1c9a1278b3
Reload NGINX after cleaning up configs (#174) 2019-10-17 21:21:17 +02:00
Thomas Boros
af54ab1401 Fix module installation when with plus (#162)
* Fixes module installation when nginx_delete_license is set to true with plus license
2019-10-03 18:10:51 +02:00
Alessandro Fael Garcia
a92d424bdb
Add support for Debian Buster (#163)
Closes #151
2019-08-07 22:16:27 +02:00
Zeno Grandi
487a2d0c07 Use Molecule for testing (#158)
* Ported test playbooks to Molecule scenarios

* Update Travis integration

* Delete legacy tests
2019-08-03 12:53:21 +02:00
Alessandro Fael Garcia
feda384b94 Improve role handling (#128)
* Improve role handling

* Add defaults to some tasks

* Improve template conditionals
2019-05-21 16:23:06 +01:00
Alessandro Fael Garcia
f3ec78e7ae Add support to the role for RHEL 8 and Alpine Linux (#129)
* Add support to the role for RHEL 8 and Alpine Linux

* Add NGINX Open Source support for Alpine Linux

* Add NGINX Open Source support for SLES 15

* Update supported platforms matrix
2019-05-20 17:32:08 +01:00
Tom Gamull
783d29639c Http auth req additions - issue 120 (#121)
* added http_auth_req

* removed existing set-headers

* is defined for proxy_pass_request_body
2019-04-18 10:51:44 +01:00
Christopher Blanchard
a7d3164ba1 Amplify installation fixes (#113)
* Remove syntax error

When evaluated (i.e. when nginx_amplify_enable=true and
nginx_amplify_api_key is defined) this line causes a syntax error

To check for empty string, opted for temporary solution outlined in https://github.com/ansible/ansible-lint/issues/457

* Fix reference to amplify api key

Previously was labelled `amplify_api_key`. Changed to
`nginx_amplify_api_key` in #a55a50d

* Fix reference to default config file

On my system at least (bionic), the default configuration file is
`/etc/amplify-agent/agent.conf.default`

This is also assumed be to the case on the amplify install shell script https://github.com/nginxinc/nginx-amplify-agent/blob/master/packages/install.sh#L526
2019-04-08 14:27:36 +01:00
Alan Downing
e0bbce9b7f Changing the API config to be a template 2019-02-28 14:27:18 -05:00
Alessandro Fael Garcia
8695f49f2b Refactor signing key tasks (#105) 2019-02-19 15:30:10 +00:00
Alessandro Fael Garcia
589d668def Add parameter to cleanup existing NGINX configs (#103) 2019-02-15 14:51:09 +00:00
Alexander Rublev
f29d9c33f0 Allow setting basic parameters for proxy cache (#94)
* Add parameters for proxy cache
2019-02-12 15:12:40 +00:00
Timothy Allen
3a66e10a17 Basic stream template (#92)
* Add Stream template defaults
* Add stream default config template
* Added stream template variables
* Changed Ansible task to use new stream template
2019-02-06 12:39:48 +00:00
Izak Eygelaar
f79e6d0210 Allow making use of Ansible-vault to encrypt and decrypt sensitive certs and keys (#95)
* Allow making use of Ansible-vault to encrypt sensitive certs and keys
2019-02-01 18:59:56 +00:00
Alessandro Fael Garcia
8ead2b7c00
Install RTMP only when using NGINX Plus (#91)
* Install RTMP only when using NGINX Plus

* Make GeoIP and NJS module tasks idempotent
2019-01-21 17:20:16 +01:00
Alessandro Fael Garcia
6693791de2
Fix module install task (#89)
* Fix module install task

* Fix perl module
2019-01-21 12:34:44 +01:00
Alessandro Fael Garcia
c1c3a372d7
Allow setting a custom apt and rpm signing key host (#84)
* Allow setting a custom apt and rpm signing key host

* Change default fallback key to https

* Use facts to determine which signing key to use

* Add single quotes
2019-01-09 00:26:14 +01:00
Alessandro Fael Garcia
c2cdc68ec3
Improve Ansible Galaxy metadata score (#79) 2018-12-21 15:17:00 +01:00
Alessandro Fael Garcia
e9a3e6a8e2 Refactor apt module loop
Apt/yum with_items module loops have been deprecated in Ansible 2.7
2018-11-19 13:42:41 -08:00
Alessandro Fael Garcia
af4450a8d5 Use url parameter instead of id and keyserver 2018-11-14 13:29:37 -08:00
Alessandro Fael Garcia
d0e6512b12 Always fallback from a hkps to a hkp keyserver 2018-11-14 12:43:41 -08:00
Alessandro Fael Garcia
71f4eb3605 Add hkp signing key fallback option for Stretch 2018-11-12 11:47:37 -08:00
Alessandro Fael Garcia
c07792daee Add extra checks for when the nginx repo is needed. 2018-10-18 21:39:36 +02:00
Alessandro Fael Garcia
42d1937b3a Add extra checks for when the nginx repo is needed. 2018-10-18 21:39:10 +02:00
gusttt
fe32888347 Only add repository key when nginx_repository is used.
Fix #68
2018-10-18 08:41:53 +02:00
Alessandro Fael Garcia
13a847234e Refactor templating
* Add more advanced HTTP templating options
* Let users choose the upload destination when uploading files
* Implement the ability to print your NGINX configuration to your terminal after running a playbook
2018-10-16 11:52:04 -07:00
Alessandro Fael Garcia
27c4069646 Fix module variable name 2018-09-14 17:53:08 -07:00
Alessandro Fael Garcia
9fea522566 Fix more repository variables 2018-09-14 17:27:12 -07:00
Alessandro Fael Garcia
d294779f8b Rename variables
All variables are now prefixed with `nginx` - resolves #57
2018-09-14 16:28:20 -07:00
Alessandro Fael Garcia
a55a50d570 Refactor NGINX Amplify agent installation 2018-09-12 14:03:20 -07:00
Alessandro Fael Garcia
809b9e3580 Fix variables in main task 2018-09-12 12:16:04 -07:00
Alessandro Fael Garcia
5ff9b63aff Update task name 2018-09-11 12:32:22 -07:00
Alessandro Fael Garcia
4b0feeb0cc Update documentation and controller variables 2018-09-11 11:26:56 -07:00
Alessandro Fael Garcia
ef1294b91c Install NGINX Controller agent 2018-09-10 16:05:25 -07:00
max
a5c73e6fcf fix [WARNING]: Ignoring invalid attribute: Name 2018-08-22 16:57:37 +08:00
Alessandro Fael Garcia
795e5a20c2
Merge pull request #50 from nginxinc/(feature)/install-prerequisites
Install Debian dependencies
2018-08-03 11:23:25 -07:00
Alessandro Fael Garcia
19a080925b Install Debian dependencies
Fixes #44
2018-08-02 15:56:25 -07:00
Alessandro Fael Garcia
3a82651d42 Refactor and fix module installation
Fixes #46 and #48
2018-08-02 12:51:45 -07:00
Alessandro Fael Garcia
2a7184a06b Add option to delete license after installing NGINX Plus 2018-08-01 11:40:35 -07:00
Alessandro Fael Garcia
2ce879f7aa Add Amazon Linux 2 for NGINX Plus 2018-07-31 16:17:09 -07:00
Alessandro Fael Garcia
0fef56b4fa Install NGINX Unit on FreeBSD 2018-07-18 14:59:14 -07:00
Alessandro Fael Garcia
a5fe8d20b2 Install NGINX Unit on Amazon Linux 2 2018-07-18 13:35:04 -07:00
Alessandro Fael Garcia
962518e5e1 Minor fixes
* Fix README typo
* Add yml start of file indicator
2018-07-12 11:19:17 -07:00
Alessandro Fael Garcia
c57e0a79d2 Add nginx_enable variable
Users can now choose to only install NGINX Unit
2018-07-11 15:41:10 -07:00
Georgy Berdyshev
194f369e13 Use hkps by default and fallback to hkp for older Debian and Ubuntu releases. 2018-07-07 00:30:48 +02:00
Georgy Berdyshev
8cada84350 Use protocol version without encryption to support older Debian and Ubuntu releases.
Fixes Travis CI error: 'HTTP fetch error 1: unsupported protocol'
2018-07-06 06:51:56 +02:00
Georgy Berdyshev
cbcc7c01f9 Updated key server to bypass firewalled environments. 2018-07-06 05:26:15 +02:00
Alessandro Fael Garcia
bd0c581ac1 Refactor installation of NGINX Unit modules
Use a list that lets users specify which modules they want to install instead of installing all modules available in each distro
2018-06-27 13:16:57 -07:00
Alessandro Fael Garcia
3a8e36e636 Fix Debian/RedHat setup
* Change yum repository from nginx to unit
* Remove apt task causing ansible to be non-idempotent
2018-06-27 11:07:35 -07:00
Alessandro Fael Garcia
a6d54c858e Merge CentOS and RedHat tasks 2018-06-26 16:26:24 -07:00
Alessandro Fael Garcia
02db93d432 Merge branch 'master' into (feature)/unit
Bring the (feature)/unit branch up to date with the master branch
2018-06-25 14:35:09 -07:00
Alessandro Fael Garcia
4037b195ff Refactor repository into a variable 2018-05-11 15:12:06 -07:00
Alessandro Fael Garcia
98974fbf1a Implement support to select NGINX repository
Resolve #32 - Initial options include using the default NGINX packages included in the host system or using the NGINX packages included in the NGINX repository
2018-05-11 13:31:31 -07:00
Alessandro Fael Garcia
033da6684c Fix indentation 2018-05-10 13:17:37 -07:00
Alessandro Fael Garcia
ce880e5731 Refactor NGINX Unit packages into a separate file 2018-05-10 13:03:22 -07:00
Alessandro Fael Garcia
ea6de99eed Use portinstall module instead of package module 2018-05-09 14:05:57 -07:00
Alessandro Fael Garcia
70a2906268 Implement FreeBSD support for NGINX Open Source
Use FreeBSD ports instead of pkgng to fetch the latest version of NGINX Open Source
2018-05-09 13:31:16 -07:00
Alessandro Fael Garcia
40d5b0bb2c Use copy/template backup parameter
Use the backup parameter in the copy/template modules instead of using a convoluted backup system
2018-04-17 17:21:31 -07:00
Alessandro Fael Garcia
b8657834f8 Fix stat path
Use the path for nginx.conf instead of default.conf
2018-04-17 16:25:37 -07:00
Alessandro Fael Garcia
c545949653 Fix stat path
Use the path for nginx.conf instead of default.conf
2018-04-17 15:21:07 -07:00
Alessandro Fael Garcia
05fcff7986 Replace *_upload_* with *_push_* 2018-04-17 14:30:43 -07:00
Alessandro Fael Garcia
e20dd288bf Check if configuration file is defined 2018-04-16 16:41:46 -07:00
Alessandro Fael Garcia
5c7924618a Replace *_upload_enable with *_push_enable
Fixes #23
2018-04-16 15:26:33 -07:00
Alessandro Fael Garcia
fd2e13bd69 Replace && with and 2018-04-13 12:53:38 -07:00
Alessandro Fael Garcia
9555ab9559 Update branding 2018-04-12 10:20:39 -07:00
Alessandro Fael Garcia
9c80941892 Only remove/backup nginx.conf when necessary 2018-04-12 10:05:43 -07:00
Alessandro Fael Garcia
e2cc1660cb
Merge pull request #14 from RDelorier/fix-template-path-bugs
Fix template path issues
2018-04-10 15:45:18 -07:00
Alessandro Fael Garcia
8a8f08a997 Add NGINX Unit variables
* Add unit_enable variable to install NGINX Unit
* Add unit_packages variable to determine whether NGINX Unit packages should be installed
2018-04-09 14:21:38 -07:00
Alessandro Fael Garcia
548fc3f9f3 Initial implementation of NGINX Unit 2018-04-06 16:32:48 -07:00
Alessandro Fael Garcia
6047a1107d Refactor REST API deployment
This refactor should fix #17 and ensure that api.conf only gets created when rest_api_enable is set to true and that api.conf gets created in the correct location
2018-04-06 16:29:49 -07:00
Alessandro Fael Garcia
681395baad Backup/remove default.conf NGINX configuration file
Backup and then remove the default.conf configuration file created by NGINX upon initial installation
2018-04-06 16:05:23 -07:00
Alessandro Fael Garcia
8bf17d77c0 Fix path for all HTTP/Stream *.conf files
Change path in all relevant tasks to ensure that HTTP and Stream NGINX *.conf files get uploaded/created in the right directory
2018-04-05 14:32:37 -07:00
rickydelorier
fb36b5b643 Fix template path issues 2018-04-04 19:48:31 -04:00
Alessandro Fael Garcia
5e3ad77986 Change rpm module and add package check for RHEL/CentOS 7.4+ 2018-03-05 14:57:04 -08:00
Alessandro Fael Garcia
b66bc5d7aa Replace shell module with assemble module 2018-03-02 16:35:34 -08:00
Alessandro Fael Garcia
15385c9cb1 Minor formatting fix 2018-03-02 15:00:07 -08:00
Alessandro Fael Garcia
a5f88d9972 Refactor rhel setup 2018-03-02 14:27:00 -08:00
Alessandro Fael Garcia
2fe4c93b45 Switch to HTTPS for rpm_key module 2018-03-01 16:58:10 -08:00
Alessandro Fael Garcia
add3bfba0b Replace get_url module
The get_url module has python 2.7 dependencies. This causes errors on distros that have strict python 2.6 dependencies. Replacing the get_url module with a hardcoded code block using the blockinfile module circumvents these errors.
2018-03-01 16:15:27 -08:00
Alessandro Fael Garcia
4a400fdf7a Remove redundant check
The main.yml task already checks for the waf variable - adding an additional check in install-waf.yml is redundant
2018-02-22 12:12:53 -08:00
Alessandro Fael Garcia
147410ab03 Refactor templates
Refactor template variables and configuration scripts
2018-02-20 12:28:14 -08:00
Alessandro Fael Garcia
57cf10d3e4 Fix image filter module 2018-02-09 12:14:18 -08:00
Alessandro Fael Garcia
5771c1e8a4 Add support for all first party NGINX modules 2018-02-09 12:00:58 -08:00
Alessandro Fael Garcia
be7788674d Fix setup-redhat.yml task names 2018-01-31 14:41:12 -08:00
Alessandro Fael Garcia
ff96678872 Setup CentOS/RHEL repositories correctly
Fixes #1
2018-01-31 14:12:25 -08:00
Alessandro Fael Garcia
f6f1e0907c Upload simple/templated configuration files 2018-01-26 11:00:26 -08:00
Alessandro Fael Garcia
78a7e3efeb Multiple changes
* Add option to enable REST API
* Add option to enable live dashboard
* Add option to install WAF module
* Load modules in nginx.conf
* Improve version check for RedHat distros
2018-01-19 10:27:47 -08:00
Alessandro Fael Garcia
0e40a9e00f Fix open source NGINX install script
Both tasks in setup-redhat.yml now correctly install the mainline or stable branch of open source NGINX
2018-01-17 10:12:14 -08:00