Skip to content

Commit

Permalink
Remove NGINX Unit from role (#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
alessfg authored Nov 13, 2020
1 parent 121312d commit a11e457
Show file tree
Hide file tree
Showing 16 changed files with 36 additions and 328 deletions.
9 changes: 0 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,6 @@ jobs:
- name: (CentOS) Test config templates
env:
scenario: template_centos
- name: (Debian/Ubuntu) Install NGINX Unit
env:
scenario: unit
- name: (Alpine Linux) Install NGINX Unit
env:
scenario: unit_alpine
- name: (CentOS) Install NGINX Unit
env:
scenario: unit_centos
- name: (Debian/Ubuntu) Build from source
env:
scenario: source
Expand Down
56 changes: 31 additions & 25 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# Changelog

## 0.18.0 (November 13, 2020)

BREAKING CHANGES:

**The NGINX Unit functionalities included in this role have been removed as of release 0.18.0.** There now is a separate role to install NGINX Unit available [here](https://github.com/nginxinc/ansible-role-nginx-unit). Any new issues or PRs related to NGINX Unit should be submitted in the new NGINX Unit repository. New issues or PRs related to NGINX Unit submitted in this repository will not be worked on.

## 0.17.4 (November 12, 2020)

ENHANCEMENTS:

* Implement a new syntax to specify modules to be installed. You can now use the following format if you want further fine grained control over how you install modules:
Implement a new syntax to specify modules to be installed. You can now use the following format if you want further fine grained control over how you install modules:
```yaml
- name: njs # Required
state: present # Optional
Expand Down Expand Up @@ -34,7 +40,7 @@ BUG FIXES:

BUG FIXES:

* Fix an issue where sometimes the role handlers will fail in distros where NGINX is not started upon installation.
Fix an issue where sometimes the role handlers will fail in distros where NGINX is not started upon installation.

## 0.17.1 (September 22, 2020)

Expand Down Expand Up @@ -81,7 +87,7 @@ BUG FIXES:

BREAKING CHANGES:

* The Debian and Ubuntu repositories have slightly changed. You may run into some duplication issues when running the role on a preexisting target that already has had NGINX installed using the role. To fix this, manually remove the old repository source.
The Debian and Ubuntu repositories have slightly changed. You may run into some duplication issues when running the role on a preexisting target that already has had NGINX installed using the role. To fix this, manually remove the old repository source.

ENHANCEMENTS:

Expand All @@ -91,11 +97,11 @@ ENHANCEMENTS:

FEATURES:

* TravisCI now always uses the latest version of Docker.
TravisCI now always uses the latest version of Docker.

BUG FIXES:

* Building OpenSSL from source should now work properly in CentOS 8.
Building OpenSSL from source should now work properly in CentOS 8.

## 0.15.0 (August 20, 2020)

Expand Down Expand Up @@ -162,7 +168,7 @@ This is a relatively minor release, but it includes a potential breaking change

BREAKING CHANGES:

* The NGINX Controller agent can no longer be installed using this role. Please use the Ansible collection linked in the README.
The NGINX Controller agent can no longer be installed using this role. Please use the Ansible collection linked in the README.

FEATURES:

Expand Down Expand Up @@ -213,20 +219,20 @@ BUG FIXES:

FEATURES:

* Improve NGINX http templating - following parameters are now supported:
* Websockets.
* Basic authentication.
* Proxy cache.
* Proxy redirect.
* Proxy timeouts.
* SSL.
* Root (in server context).
* Add basic NGINX stream templating.
* Add support for RHEL 8 and Alpine Linux.
Improve NGINX http templating - following parameters are now supported:
* Websockets.
* Basic authentication.
* Proxy cache.
* Proxy redirect.
* Proxy timeouts.
* SSL.
* Root (in server context).
* Add basic NGINX stream templating.
* Add support for RHEL 8 and Alpine Linux.

BUG FIXES:

* Fix module installation tasks.
Fix module installation tasks.

## 0.11.0 (Januray 14, 2019)

Expand All @@ -250,13 +256,13 @@ BUG FIXES:

BUG FIXES:

* Fix HTML template to use correct variable name.
Fix HTML template to use correct variable name.

## 0.10.0 (November 26, 2018)

FEATURES:

* Improve templating support for health checks, multiple location blocks, and auto indexing.
Improve templating support for health checks, multiple location blocks, and auto indexing.

BUG FIXES:

Expand All @@ -281,13 +287,13 @@ FEATURES:

BUG FIXES:

* Correct spelling of name in `tasks/prerequisites/setup-debian.yml`.
Correct spelling of name in `tasks/prerequisites/setup-debian.yml`.

## 0.7.1 (August 21, 2018)

FEATURES:

* Add enabled parameter to NGINX and NGINX Unit handlers.
Add enabled parameter to NGINX and NGINX Unit handlers.

## 0.7.0 (August 4, 2018)

Expand All @@ -313,7 +319,7 @@ FEATURES:

FEATURES:

* Add support for NGINX Unit.
Add support for NGINX Unit.

## 0.4.0 (May 25, 2018)

Expand All @@ -326,17 +332,17 @@ FEATURES:

FEATURES:

* Improve Travis CI testing strategy.
Improve Travis CI testing strategy.

BUG FIXES:

* Fix templating and push tasks.
Fix templating and push tasks.

## 0.2.0 (April 12, 2018)

FEATURES:

* Add support for all first party NGINX modules.
Add support for all first party NGINX modules.

BUG FIXES:

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Follow our [Installation Guide](https://github.com/nginxinc/ansible-role-nginx/b

### Project Structure

* The NGINX Ansible role is written in `yaml` and supports NGINX Open Source, NGINX Plus, NGINX Amplify, and NGINX Unit.
* The NGINX Ansible role is written in `yaml` and supports NGINX Open Source, NGINX Plus, and NGINX Amplify.
* The project follows the standard [Ansible role directory structure](https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html):
* The main code is found in `tasks/`.
* Variables can be found in `defaults/main/*.yml`.
Expand Down
32 changes: 3 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Ansible NGINX Role

This role installs NGINX Open Source, NGINX Plus, the NGINX Amplify agent, or NGINX Unit on your target host.
This role installs NGINX Open Source, NGINX Plus, or the NGINX Amplify agent on your target host.

**Note:** This role is still in active development. There may be unidentified issues and the role variables may change as development continues.

Expand All @@ -15,7 +15,7 @@ This role installs NGINX Open Source, NGINX Plus, the NGINX Amplify agent, or NG
With the advent of Ansible collections and the release of the [NGINX Core Ansible collection](https://github.com/nginxinc/ansible-collection-nginx), the decision has been made to split this role into three smaller roles and reduce the overhead of this role:
* The NGINX Ansible role will keep working as is and be used to install and setup NGINX.
* **The NGINX configuration functionalities included in this role will be removed in an upcoming release at some stage after December 1st 2020.** There now is a separate role to manage and create NGINX configurations available [here](https://github.com/nginxinc/ansible-role-nginx-config). Any new issues or PRs related to configuring NGINX should be submitted in the new NGINX Config repository. New issues or PRs related to configuring NGINX submitted in this repository will not be worked on.
* **The NGINX Unit functionalities included in this role will be removed in an upcoming release at some stage after November 1st 2020.** There now is a separate role to install NGINX Unit available [here](https://github.com/nginxinc/ansible-role-nginx-unit). Any new issues or PRs related to NGINX Unit should be submitted in the new NGINX Unit repository. New issues or PRs related to NGINX Unit submitted in this repository will not be worked on.
* **The NGINX Unit functionalities included in this role have been removed as of release 0.18.0.** There now is a separate role to install NGINX Unit available [here](https://github.com/nginxinc/ansible-role-nginx-unit). Any new issues or PRs related to NGINX Unit should be submitted in the new NGINX Unit repository. New issues or PRs related to NGINX Unit submitted in this repository will not be worked on. This disclaimer will be removed in a future release.

## Requirements

Expand All @@ -41,7 +41,7 @@ Use `git clone https://github.com/nginxinc/ansible-role-nginx.git` to pull the l

## Platforms

The NGINX Ansible role supports all platforms supported by [NGINX Open Source](https://nginx.org/en/linux_packages.html), [NGINX Plus](https://docs.nginx.com/nginx/technical-specs/), the [NGINX Amplify agent](https://github.com/nginxinc/nginx-amplify-doc/blob/master/amplify-faq.md#21-what-operating-systems-are-supported), and [NGINX Unit](https://unit.nginx.org/installation/#official-packages):
The NGINX Ansible role supports all platforms supported by [NGINX Open Source](https://nginx.org/en/linux_packages.html), [NGINX Plus](https://docs.nginx.com/nginx/technical-specs/), and the [NGINX Amplify agent](https://github.com/nginxinc/nginx-amplify-doc/blob/master/amplify-faq.md#21-what-operating-systems-are-supported):

### NGINX Open Source

Expand Down Expand Up @@ -130,30 +130,6 @@ Ubuntu:
- focal
```
### NGINX Unit
```yaml
Amazon Linux:
- 2018.03
Amazon Linux 2:
- any
CentOS:
- 6
- 7
- 8
Debian:
- stretch
- buster
Red Hat:
- 6
- 7
- 8
Ubuntu:
- xenial
- bionic
- focal
```
**Note:** You can also use this role to compile NGINX Open Source from source, install NGINX Open Source on compatible yet unsupported platforms, or install NGINX Open Source on BSD systems at your own risk.
## Role Variables
Expand All @@ -168,7 +144,6 @@ This role has multiple variables. The descriptions and defaults for all these va
|**[`upload.yml`](https://github.com/nginxinc/ansible-role-nginx/blob/main/defaults/main/upload.yml)**|NGINX configuration/HTML/SSL upload variables|
|**[`linux.yml`](https://github.com/nginxinc/ansible-role-nginx/blob/main/defaults/main/linux.yml)**|Linux installation variables|
|**[`bsd.yml`](https://github.com/nginxinc/ansible-role-nginx/blob/main/defaults/main/bsd.yml)**|BSD installation variables|
|**[`unit.yml`](https://github.com/nginxinc/ansible-role-nginx/blob/main/defaults/main/unit.yml)**|NGINX Unit installation variables|

Similarly, descriptions and defaults for preset variables can be found in the **[`vars/`](https://github.com/nginxinc/ansible-role-nginx/blob/main/vars/)** folder in the following files:

Expand All @@ -188,7 +163,6 @@ Working functional playbook examples can be found in the **[`molecule/common/pla
|**[`source_converge.yml`](https://github.com/nginxinc/ansible-role-nginx/blob/main/molecule/common/playbooks/source_converge.yml)**|Install NGINX from source|
|**[`stable_push_converge.yml`](https://github.com/nginxinc/ansible-role-nginx/blob/main/molecule/common/playbooks/stable_push_converge.yml)**|Install NGINX using the stable branch and push a preexisting config from your system to your NGINX instance|
|**[`template_converge.yml`](https://github.com/nginxinc/ansible-role-nginx/blob/main/molecule/common/playbooks/template_converge.yml)**|Use the NGINX configuration templating variables to create an NGINX configuration file|
|**[`unit_converge.yml`](https://github.com/nginxinc/ansible-role-nginx/blob/main/molecule/common/playbooks/unit_converge.yml)**|Install NGINX Unit|

Do note that if you install this repository via Ansible Galaxy, you will have to replace the role variable in the sample playbooks from `ansible-role-nginx` to `nginxinc.nginx`.

Expand Down
7 changes: 0 additions & 7 deletions defaults/main/unit.yml

This file was deleted.

12 changes: 0 additions & 12 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,5 @@
name: amplify-agent
state: started

- name: (DEPRECATED Handler - Debian/Ubuntu/CentOS/RedHat) Start NGINX Unit
service:
name: unit
state: started
enabled: yes

- name: (DEPRECATED Handler - FreeBSD) Start NGINX Unit
service:
name: unitd
state: started
enabled: yes

- name: (Handler) Run logrotate
command: logrotate -f /etc/logrotate.d/nginx
32 changes: 0 additions & 32 deletions molecule/common/playbooks/unit_converge.yml

This file was deleted.

47 changes: 0 additions & 47 deletions molecule/unit/molecule.yml

This file was deleted.

40 changes: 0 additions & 40 deletions molecule/unit_alpine/molecule.yml

This file was deleted.

Loading

0 comments on commit a11e457

Please sign in to comment.