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
This role installs and configures NGINX App Protect (WAF) for NGINX Plus on your target host.
10
10
@@ -41,149 +41,116 @@ The NGINX App Protect Ansible role supports all platforms supported by [NGINX Pl
41
41
42
42
```yaml
43
43
CentOS:
44
-
versions:
45
-
- 7.4
46
-
- 7.5
47
-
- 7.6
48
-
- 7.7
49
-
- 7.8
50
-
- 8.0
51
-
- 8.1
52
-
- 8.2
44
+
- 7.4+
53
45
RHEL:
54
-
versions:
55
-
- 7.4
56
-
- 7.5
57
-
- 7.6
58
-
- 7.7
59
-
- 7.8
60
-
- 8.0
61
-
- 8.1
62
-
- 8.2
46
+
- 7.4+
63
47
Debian:
64
-
versions:
65
-
- 9.0
66
-
- 9.1
67
-
- 9.2
68
-
- 9.3
69
-
- 9.4
70
-
- 9.5
71
-
- 9.6
72
-
- 9.7
73
-
- 9.8
74
-
- 9.9
75
-
- 9.10
76
-
- 9.11
77
-
- 9.12
48
+
- 9
78
49
Ubuntu:
79
-
versions:
80
-
- 18.04
50
+
- 18.04
81
51
```
82
52
83
53
Role Variables
84
54
--------------
85
55
86
-
This role has multiple variables. The descriptions and defaults for all these variables can be found in the **[defaults/main.yml](./defaults/main.yml)`**.
87
-
56
+
This role has multiple variables. The descriptions and defaults for all these variables can be found in the **[defaults/main.yml](https://github.com/nginxinc/ansible-role-nginx-app-protect/blob/main/defaults/main.yml)**.
88
57
89
58
Dependencies
90
59
------------
91
60
92
-
- 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.
61
+
- 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.
93
62
94
-
- If NGINX+ is *not* already installed on the system, this role will install the version of NGINX+ that is dependent on the version of NGINX App Protect set with the `app_protect_version` variable. If none is specified, the latest version of NGINX+ and NGINX App Protect will be installed.
63
+
- 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.
95
64
96
-
- When using the `app_protect_version` variable, a specific version of NGINX+ must already be installed on the target system.
65
+
- When using the `nginx_app_protect_version` variable, a specific version of NGINX Plus must already be installed on the target system.
97
66
98
67
Example Playbook
99
68
----------------
100
69
101
-
102
70
This is a sample playbook file for using the role to install NGINX App Protect on NGINX Plus and configure it using basic settings to all `wafs` inventory hosts.
103
71
104
72
A copy of this is in the sample-playbook directory in this repo.
105
73
106
74
First create a file for all the variables as `nginx-app-protect-vars.yml`
75
+
107
76
```yaml
108
77
---
109
-
110
-
# Specify whether you want to maintain your version of NGINX App Protect, upgrade to the latest version, or remove NGINX App Protect.
111
-
# Can be used with `app_protect_version` to achieve fine grained control on which version of NGINX App Protect is installed/used on each playbook execution.
112
-
# Using 'present' will install the latest version (or 'app_protect_version') of NGINX App Protect on a fresh install.
113
-
# Using 'latest' will upgrade NGINX App Protect to the latest version (that matches your 'app_protect_version') of NGINX App Protect on every playbook execution.
114
-
# Using 'absent' will remove NGINX App Protect from your system.
115
-
# Default is present.
116
-
app_protect_state: present
117
-
118
-
# OPTIONAL: Installs a specific version of NGINX App Protect
119
-
app_protect_version: 22
120
-
121
-
# The installation of NGINX App Protect includes a base signature set, which may be out of date.
122
-
# This option installs the latest NGINX App Protect signatures.
123
-
app_protect_install_signatures: true
124
-
125
-
# The installation of NGINX App Protect can include a page of frequently-updated, high-accuracy signatures called Threat Campaigns.
126
-
# This option installs the latest NGINX App Protect Threat Campaigns signatures.
127
-
app_protect_install_threat_campaigns: true
128
-
129
-
# Creates basic configuration files and enables NGINX App Protect on the target host
130
-
app_protect_configure: true
131
-
132
-
# Removes the license (certificate and key) for the NGINX App Protect repositories on the target host(s) when playbook run is complete.
133
-
app_protect_delete_license: true
134
-
135
-
# If you have a RHEL subscription, NGINX App Protect's dependencies will use subscription repos.
136
-
# Otherwise, it will source packages from CentOS' repositories.
137
-
app_protect_use_rhel_subscription_repos: false
138
-
139
-
# For use with the app_protect_configure option to determine if the default security policy will be written to the target host
140
-
# Used when `app_protect_configure: true`.
141
-
app_protect_security_policy_template_enable: true
142
-
143
-
# Default app protect enforcement mode. Values can be `blocking` or `transparent`.
144
-
# Used when `app_protect_configure: true` and `app_protect_security_policy_template_enable: true`.
145
-
security_policy_enforcement_mode: blocking
146
-
147
-
# For use with the app_protect_configure option to determine if the default log policy will be written to the target host.
148
-
# Used when `app_protect_configure: true`.
149
-
app_protect_log_policy_template_enable: true
150
-
151
-
# Which violation types to log. Possible values: all, illegal, blocked
152
-
# Used when `app_protect_configure: true` and `app_protect_log_policy_template_enable: true`.
153
-
log_policy_filter_request_type: all
154
-
155
-
# For use with the app_protect_configure option to determine if the sample nginx.conf will be written to the target host.
156
-
# Since this can be dangerous, this value is default to false in the role defaults.
157
-
# Used when `app_protect_configure: true`.
158
-
nginx_conf_template_enable: true
159
-
160
-
# For use with the app_protect_configure option to determine the syslog target to be injected
161
-
# into the default log policy that will be written to the target host.
162
-
# Used when `nginx_conf_template_enable: true`.
163
-
log_policy_syslog_target: 10.1.1.8:5144
164
-
165
-
# DEPRECATED: A proxy pass workload used in the sample nginx.conf for demo purposes.
166
-
# Will be removed from this role in the future.
167
-
# Used when `nginx_conf_template_enable: true`.
168
-
nginx_demo_workload: http://10.1.10.105:8080
169
-
170
-
# The location of the certificate and key to be used when downloading the packages onto the host
# Specify whether you want to maintain your version of NGINX App Protect, upgrade to the latest version, or remove NGINX App Protect.
79
+
# Can be used with `nginx_app_protect_version` to achieve fine grained control on which version of NGINX App Protect is installed/used on each playbook execution.
80
+
# Using 'present' will install the latest version (or 'nginx_app_protect_version') of NGINX App Protect on a fresh install.
81
+
# Using 'latest' will upgrade NGINX App Protect to the latest version (that matches your 'nginx_app_protect_version') of NGINX App Protect on every playbook execution.
82
+
# Using 'absent' will remove NGINX App Protect from your system.
83
+
# Default is present.
84
+
nginx_app_protect_state: present
85
+
86
+
# OPTIONAL: Installs a specific version of NGINX App Protect
87
+
nginx_app_protect_version: 22
88
+
89
+
# The installation of NGINX App Protect includes a base signature set, which may be out of date.
90
+
# This option installs the latest NGINX App Protect signatures.
91
+
nginx_app_protect_install_signatures: true
92
+
93
+
# The installation of NGINX App Protect can include a page of frequently-updated, high-accuracy signatures called Threat Campaigns.
94
+
# This option installs the latest NGINX App Protect Threat Campaigns signatures.
95
+
nginx_app_protect_install_threat_campaigns: true
96
+
97
+
# Creates basic configuration files and enables NGINX App Protect on the target host
98
+
nginx_app_protect_configure: true
99
+
100
+
# Removes the license (certificate and key) for the NGINX App Protect repositories on the target host(s) when playbook run is complete.
101
+
nginx_app_protect_delete_license: true
102
+
103
+
# If you have a RHEL subscription, NGINX App Protect's dependencies will use subscription repos.
104
+
# Otherwise, it will source packages from CentOS' repositories.
0 commit comments