Skip to content

Commit 428dffd

Browse files
authored
Remove nginx_app_protect_configure parameter (#167)
1 parent e901119 commit 428dffd

File tree

4 files changed

+21
-26
lines changed

4 files changed

+21
-26
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ BREAKING CHANGES:
77
* Rename `nginx_app_protect_<waf/dos>_state` parameter to `nginx_app_protect_<waf/dos>_setup` parameters.
88
* Rename multiple `nginx_app_protect_*` parameters and tags to `nginx_app_protect_waf_*` to aid in disambiguation.
99
* Cleanup remaining Alpine Linux tasks.
10+
* Remove `nginx_app_protect_configure` parameter since it has limited functionality given the `nginx_app_protect_*_policy_file_enable` parameters.
1011

1112
ENHANCEMENTS:
1213

defaults/main.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,6 @@ nginx_app_protect_start: true
9999
nginx_app_protect_service_modify: true
100100
nginx_app_protect_timeout: 180
101101

102-
# Creates basic configuration files and enables NGINX App Protect WAF on the target host
103-
nginx_app_protect_configure: false
104-
105102
# Copy local NGINX App Protect security policy to host
106103
nginx_app_protect_security_policy_file_enable: false
107104
nginx_app_protect_security_policy_file:

molecule/advanced/converge.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@
1212
nginx_app_protect_remove_license: false
1313
nginx_app_protect_install_signatures: true
1414
nginx_app_protect_install_threat_campaigns: true
15-
nginx_app_protect_configure: true
1615
nginx_app_protect_timeout: 180

tasks/main.yml

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,25 @@
33
include_tasks: "{{ role_path }}/tasks/common/prerequisites/validate-supported-os.yml"
44
when: nginx_app_protect_waf_state != "absent" or nginx_app_protect_dos_state != "absent"
55

6-
- name: Check for conflicting WAF config variables
7-
block:
8-
- name: Fail if variables for 'nginx_app_protect_security_policy_file_enable' are not defined
9-
assert:
10-
that:
11-
- "{{ item }} is defined"
12-
- "{{ item }} | length > 0"
13-
loop:
14-
- nginx_app_protect_security_policy_file.0.src
15-
- nginx_app_protect_security_policy_file.0.dest
16-
when: nginx_app_protect_security_policy_file_enable | bool
6+
- name: Fail if variables for 'nginx_app_protect_security_policy_file_enable' are not defined
7+
assert:
8+
that:
9+
- "{{ item }} is defined"
10+
- "{{ item }} | length > 0"
11+
loop:
12+
- nginx_app_protect_security_policy_file.0.src
13+
- nginx_app_protect_security_policy_file.0.dest
14+
when: nginx_app_protect_security_policy_file_enable | bool
1715

18-
- name: Fail if variables for 'nginx_app_protect_log_policy_file_enable' are not defined
19-
assert:
20-
that:
21-
- "{{ item }} is defined"
22-
- "{{ item }} | length > 0"
23-
loop:
24-
- nginx_app_protect_log_policy_file.0.src
25-
- nginx_app_protect_log_policy_file.0.dest
26-
when: nginx_app_protect_log_policy_file_enable | bool
27-
when: nginx_app_protect_configure | bool
16+
- name: Fail if variables for 'nginx_app_protect_log_policy_file_enable' are not defined
17+
assert:
18+
that:
19+
- "{{ item }} is defined"
20+
- "{{ item }} | length > 0"
21+
loop:
22+
- nginx_app_protect_log_policy_file.0.src
23+
- nginx_app_protect_log_policy_file.0.dest
24+
when: nginx_app_protect_log_policy_file_enable | bool
2825

2926
- name: Install prerequisites
3027
include_tasks: "{{ role_path }}/tasks/common/prerequisites/install-dependencies.yml"
@@ -63,5 +60,6 @@
6360

6461
- name: Configure NGINX App Protect
6562
include_tasks: "{{ role_path }}/tasks/common/config/configure-app-protect.yml"
66-
when: nginx_app_protect_configure | bool
63+
when: nginx_app_protect_security_policy_file_enable | bool
64+
or nginx_app_protect_log_policy_file_enable | bool
6765
tags: nginx_app_protect_configure

0 commit comments

Comments
 (0)