You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# 👾 *Help make the NGINX App Protect Ansible role better by participating in our [survey](https://forms.office.com/Pages/ResponsePage.aspx?id=L_093Ttq0UCb4L-DJ9gcUKLQ7uTJaE1PitM_37KR881UM0NCWkY5UlE5MUYyWU1aTUcxV0NRUllJSC4u)!* 👾
# NGINX App Protect Ansible Role <imgsrc="images/nap-logo.png"width="30">
8
8
9
9
This role installs and configures NGINX App Protect (WAF) for NGINX Plus on your target host.
10
10
11
11
**Note:** This role is still in active development. There may be unidentified issues and the role variables may change as development continues.
12
12
13
-
Requirements
14
-
------------
13
+
## Requirements
15
14
16
-
**Ansible**
15
+
### Ansible
17
16
18
-
This role was developed and tested with [maintained](https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#release-status) versions of Ansible. Backwards compatibility is not guaranteed.
17
+
* This role is developed and tested with [maintained](https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#release-status) versions of Ansible. Backwards compatibility is not guaranteed.
18
+
* Instructions on how to install Ansible can be found in the [Ansible website](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html).
19
19
20
-
Instructions on how to install Ansible can be found in the [Ansible website](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html).
20
+
### Molecule
21
21
22
-
**Molecule**
22
+
* Molecule `3.x` is used to test the various functionalities of the role.
23
+
* Instructions on how to install Molecule can be found in the [Molecule website](https://molecule.readthedocs.io/en/latest/installation.html).
24
+
* To run the Molecule tests, you must first add your NGINX repository certificate and key to the local environment. Run the following commands to export these files as base64-encoded variables and execute the Molecule tests:
25
+
```bash
26
+
export NGINX_CRT=$( cat <path to your certificate file>| base64 )
27
+
export NGINX_KEY=$( cat <path to your key file>| base64 )
28
+
molecule test
29
+
```
30
+
You can alternatively copy your NGINX license to the role's [`files/license`](https://github.com/nginxinc/ansible-role-nginx-app-protect/blob/main/files/license/) folder.
23
31
24
-
Molecule is used to test the various functionalities of the role. Instructions on how to install Molecule can be found in the [Molecule website](https://molecule.readthedocs.io/en/stable/installation.html).
32
+
## Installation
25
33
26
-
To run the Molecule tests, you must first add your NGINX repository certificate and key to the local environment. Run the following commands to export these files as base64-encoded variables and execute the Molecule tests:
27
-
28
-
```bash
29
-
export NGINX_CRT=$( cat <path to your certificate file>| base64 )
30
-
export NGINX_KEY=$( cat <path to your key file>| base64 )
31
-
molecule test
32
-
```
33
-
34
-
Installation
35
-
------------
36
-
37
-
**Ansible Galaxy**
34
+
### Ansible Galaxy
38
35
39
36
Use `ansible-galaxy install nginxinc.nginx_app_protect` to install the latest stable release of the role on your system.
40
37
41
-
**Git**
38
+
### Git
42
39
43
40
Use `git clone https://github.com/nginxinc/ansible-role-nginx-app-protect.git` to pull the latest edge commit of the role from GitHub.
44
41
45
-
Platforms
46
-
---------
42
+
## Platforms
47
43
48
44
The NGINX App Protect Ansible role supports all platforms supported by [NGINX Plus](https://www.nginx.com/products/technical-specs/) that intersect with the following list:
49
45
@@ -58,51 +54,53 @@ Ubuntu:
58
54
- 18.04
59
55
```
60
56
61
-
Role Variables
62
-
--------------
57
+
## Role Variables
58
+
59
+
This role has multiple variables. The descriptions and defaults for all these variables can be found in the **[`defaults/`](https://github.com/nginxinc/ansible-role-nginx-app-protect/blob/main/defaults/)** folder in the following files:
63
60
64
-
This role has multiple variables. The descriptions and defaults for all these variables can be found in the **`defaults`** directory in the following files:
61
+
|Name|Description|
62
+
|----|-----------|
63
+
|**[`main.yml`](https://github.com/nginxinc/ansible-role-nginx-app-protect/blob/main/defaults/main.yml):|NGINX App Protect installation and configuration variables|
65
64
66
-
- **[defaults/main.yml](https://github.com/nginxinc/ansible-role-nginx-app-protect/blob/main/defaults/main.yml)**: NGINX App Protect installation and configuration variables
65
+
Similarly, descriptions and defaults for preset variables can be found in the **`vars/`** folder in the following files:
67
66
68
-
Similarly, descriptions and defaults for preset variables can be found in the **`vars`** directory in the following files:
67
+
|Name|Description|
68
+
|----|-----------|
69
+
|**[`main.yml`](https://github.com/nginxinc/ansible-role-nginx-app-protect/blob/main/vars/main.yml)**|List of supported NGINX App Protect platforms|
69
70
70
-
- **[vars/main.yml](https://github.com/nginxinc/ansible-role-nginx-app-protect/blob/main/vars/main.yml):** List of supported NGINX App Protect platforms
71
+
## Dependencies
71
72
72
-
Dependencies
73
-
------------
73
+
* Since this role uses the [package_facts](https://docs.ansible.com/ansible/latest/modules/package_facts_module.html) module, on debian-based systems the `python-apt` package must be installed on targeted hosts.
74
74
75
-
-Since this role uses the [package_facts](https://docs.ansible.com/ansible/latest/modules/package_facts_module.html) module, on debian-based systems the `python-apt` package must be installed on targeted hosts.
75
+
*If NGINX Plus is *not* already installed on the system, this role will install the version of NGINX Plus that is dependent on the version of NGINX App Protect set with the `nginx_app_protect_version` variable. If none is specified, the latest version of NGINX Plus and NGINX App Protect will be installed.
76
76
77
-
- If NGINX Plus is *not* already installed on the system, this role will install the version of NGINX Plus that is dependent on the version of NGINX App Protect set with the `nginx_app_protect_version` variable. If none is specified, the latest version of NGINX Plus and NGINX App Protect will be installed.
77
+
* When using the `nginx_app_protect_version` variable, a specific version of NGINX Plus must already be installed on the target system.
78
78
79
-
- When using the `nginx_app_protect_version` variable, a specific version of NGINX Plus must already be installed on the target system.
79
+
## Example Playbook
80
80
81
-
Example Playbook
82
-
----------------
81
+
A working functional playbook example can be found in the **`molecule/default/`** folder in the following file:
83
82
84
-
A working functional playbook example can be found in the **`molecule/default`** directory in the following file:
83
+
|Name|Description|
84
+
|----|-----------|
85
+
|**[`molecule/default/converge.yml`](https://github.com/nginxinc/ansible-role-nginx-app-protect/blob/main/molecule/default/converge.yml)**|Install and configure NGINX App Protect|
85
86
86
-
- **[molecule/default/converge.yml](https://github.com/nginxinc/ansible-role-nginx-app-protect/blob/main/molecule/default/converge.yml):** Install and configure NGINX App Protect
87
+
## Other NGINX Ansible Collections and Roles
87
88
88
-
Other NGINX Roles
89
-
-----------------
89
+
You can find the Ansible NGINX Core collection of roles to install and configure NGINX Open Source, NGINX Plus, and NGINX App Protect [here](https://github.com/nginxinc/ansible-collection-nginx).
90
90
91
-
You can find an Ansible role to install NGINX [here](https://github.com/nginxinc/ansible-role-nginx)
91
+
You can find the Ansible NGINX role to install NGINX [here](https://github.com/nginxinc/ansible-role-nginx).
92
92
93
-
You can find an Ansible role to configure NGINX [here](https://github.com/nginxinc/ansible-role-nginx-config)
93
+
You can find the Ansible NGINX configuration role to configure NGINX [here](https://github.com/nginxinc/ansible-role-nginx-config).
94
94
95
-
You can find an Ansible collection of roles to help you install and configure NGINX Controller [here](https://github.com/nginxinc/ansible-collection-nginx_controller)
95
+
You can find the Ansible NGINX Controller collection of roles to install and configure NGINX Controller [here](https://github.com/nginxinc/ansible-collection-nginx_controller).
96
96
97
-
You can find an Ansible role to install NGINX Unit [here](https://github.com/nginxinc/ansible-role-nginx-unit)
97
+
You can find the Ansible NGINX Unit role to install NGINX Unit [here](https://github.com/nginxinc/ansible-role-nginx-unit).
98
98
99
-
License
100
-
-------
99
+
## License
101
100
102
101
[Apache License, Version 2.0](https://github.com/nginxinc/ansible-role-nginx-app-protect/blob/main/LICENSE)
0 commit comments