Skip to content

Commit 47eb502

Browse files
authored
Replace nginx_license_status with the correct variable (#147)
1 parent 67e9510 commit 47eb502

File tree

6 files changed

+23
-19
lines changed

6 files changed

+23
-19
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ BREAKING CHANGES:
66

77
Refactor how `nginx_app_protect_*_policy_file*` variables work. You can now specify a list of both `security` and `log` policies for both NGINX App Protect WAF and NGINX App Protect DoS.
88

9+
BUG FIXES:
10+
11+
Fix instances of `nginx_app_protect_license_status` being incorrectly set as `nginx_license_status` instead.
12+
913
## 0.6.2 (October 25, 2021)
1014

1115
ENHANCEMENTS:

tasks/dos/install-debian.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Acquire::https::{{ (nginx_plus_repository | default(nginx_plus_default_repository_debian)) | regex_search('(?<=https://)[^/]*') }}::Verify-Host "true";
99
Acquire::https::{{ (nginx_plus_repository | default(nginx_plus_default_repository_debian)) | regex_search('(?<=https://)[^/]*') }}::SslCert "/etc/ssl/nginx/nginx-repo.crt";
1010
Acquire::https::{{ (nginx_plus_repository | default(nginx_plus_default_repository_debian)) | regex_search('(?<=https://)[^/]*') }}::SslKey "/etc/ssl/nginx/nginx-repo.key";
11-
state: "{{ nginx_license_status | default ('present') }}"
11+
state: "{{ nginx_app_protect_license_status | default ('present') }}"
1212
mode: 0444
1313

1414
- name: (Debian/Ubuntu) {{ nginx_app_protect_license_status is defined | ternary('Remove', 'Configure') }} NGINX App Protect DoS license
@@ -45,5 +45,5 @@
4545
state: "{{ nginx_app_protect_dos_state }}"
4646
update_cache: true
4747
ignore_errors: "{{ ansible_check_mode }}"
48-
when: nginx_license_status is not defined
48+
when: nginx_app_protect_license_status is not defined
4949
notify: (Handler - NGINX App Protect) Run NGINX

tasks/dos/install-redhat.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@
2828
update_cache: true
2929
allow_downgrade: true
3030
ignore_errors: "{{ ansible_check_mode }}"
31-
when: nginx_license_status is not defined
31+
when: nginx_app_protect_license_status is not defined
3232
notify: (Handler - NGINX App Protect) Run NGINX

tasks/waf/install-alpine.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
---
2-
- name: (Alpine Linux) {{ nginx_license_status is defined | ternary('Remove', 'Configure') }} NGINX Plus repository
2+
- name: (Alpine Linux) {{ nginx_app_protect_license_status is defined | ternary('Remove', 'Configure') }} NGINX Plus repository
33
lineinfile:
44
path: /etc/apk/repositories
55
insertafter: EOF
66
line: "{{ nginx_plus_repository | default(nginx_plus_default_repository_alpine) }}"
7-
state: "{{ nginx_license_status | default ('present') }}"
7+
state: "{{ nginx_app_protect_license_status | default ('present') }}"
88
when: nginx_app_protect_manage_repo | bool
99

10-
- name: (Alpine Linux) {{ nginx_license_status is defined | ternary('Remove', 'Configure') }} NGINX App Protect WAF repository
10+
- name: (Alpine Linux) {{ nginx_app_protect_license_status is defined | ternary('Remove', 'Configure') }} NGINX App Protect WAF repository
1111
lineinfile:
1212
path: /etc/apk/repositories
1313
insertafter: EOF
1414
line: "{{ nginx_app_protect_repository | default(nginx_app_protect_default_repository_alpine) }}"
15-
state: "{{ nginx_license_status | default ('present') }}"
15+
state: "{{ nginx_app_protect_license_status | default ('present') }}"
1616
when: nginx_app_protect_manage_repo | bool
1717

18-
- name: (Alpine Linux) {{ nginx_license_status is defined | ternary('Remove', 'Configure') }} NGINX App Protect WAF security updates repository
18+
- name: (Alpine Linux) {{ nginx_app_protect_license_status is defined | ternary('Remove', 'Configure') }} NGINX App Protect WAF security updates repository
1919
lineinfile:
2020
path: /etc/apk/repositories
2121
insertafter: EOF
2222
line: "{{ nginx_app_protect_security_updates_repository | default(nginx_app_protect_security_updates_default_repository_alpine) }}"
23-
state: "{{ nginx_license_status | default ('present') }}"
23+
state: "{{ nginx_app_protect_license_status | default ('present') }}"
2424
when:
2525
- (nginx_app_protect_install_signatures | bool) or (nginx_app_protect_install_threat_campaigns | bool)
2626
- nginx_app_protect_manage_repo | bool
@@ -31,7 +31,7 @@
3131
state: "{{ nginx_app_protect_waf_state }}"
3232
update_cache: true
3333
ignore_errors: "{{ ansible_check_mode }}"
34-
when: nginx_license_status is not defined
34+
when: nginx_app_protect_license_status is not defined
3535
notify: (Handler - NGINX App Protect) Run NGINX
3636

3737
- name: (Alpine Linux) Install NGINX App Protect WAF signatures {{ nginx_app_protect_signatures_version is defined | ternary(nginx_app_protect_signatures_version, '') }}
@@ -42,7 +42,7 @@
4242
ignore_errors: "{{ ansible_check_mode }}"
4343
when:
4444
- nginx_app_protect_install_signatures | bool
45-
- nginx_license_status is not defined
45+
- nginx_app_protect_license_status is not defined
4646
notify: (Handler - NGINX App Protect) Run NGINX
4747

4848
- name: (Alpine Linux) Install NGINX App Protect WAF threat campaigns {{ nginx_app_protect_threat_campaigns_version is defined | ternary(nginx_app_protect_threat_campaigns_version, '') }}
@@ -53,5 +53,5 @@
5353
ignore_errors: "{{ ansible_check_mode }}"
5454
when:
5555
- nginx_app_protect_install_threat_campaigns | bool
56-
- nginx_license_status is not defined
56+
- nginx_app_protect_license_status is not defined
5757
notify: (Handler - NGINX App Protect) Run NGINX

tasks/waf/install-debian.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Acquire::https::{{ (nginx_plus_repository | default(nginx_plus_default_repository_debian)) | regex_search('(?<=https://)[^/]*') }}::Verify-Host "true";
99
Acquire::https::{{ (nginx_plus_repository | default(nginx_plus_default_repository_debian)) | regex_search('(?<=https://)[^/]*') }}::SslCert "/etc/ssl/nginx/nginx-repo.crt";
1010
Acquire::https::{{ (nginx_plus_repository | default(nginx_plus_default_repository_debian)) | regex_search('(?<=https://)[^/]*') }}::SslKey "/etc/ssl/nginx/nginx-repo.key";
11-
state: "{{ nginx_license_status | default ('present') }}"
11+
state: "{{ nginx_app_protect_license_status | default ('present') }}"
1212
mode: 0444
1313

1414
- name: (Debian/Ubuntu) {{ nginx_app_protect_license_status is defined | ternary('Remove', 'Configure') }} NGINX App Protect WAF license
@@ -72,7 +72,7 @@
7272
state: "{{ nginx_app_protect_waf_state }}"
7373
update_cache: true
7474
ignore_errors: "{{ ansible_check_mode }}"
75-
when: nginx_license_status is not defined
75+
when: nginx_app_protect_license_status is not defined
7676
notify: (Handler - NGINX App Protect) Run NGINX
7777

7878
- name: (Debian/Ubuntu) Install NGINX App Protect WAF signatures {{ nginx_app_protect_signatures_version is defined | ternary(nginx_app_protect_signatures_version, '') }}
@@ -83,7 +83,7 @@
8383
ignore_errors: "{{ ansible_check_mode }}"
8484
when:
8585
- nginx_app_protect_install_signatures | bool
86-
- nginx_license_status is not defined
86+
- nginx_app_protect_license_status is not defined
8787
notify: (Handler - NGINX App Protect) Run NGINX
8888

8989
- name: (Debian/Ubuntu) Install NGINX App Protect WAF threat campaigns {{ nginx_app_protect_threat_campaigns_version is defined | ternary(nginx_app_protect_threat_campaigns_version, '') }}
@@ -94,5 +94,5 @@
9494
ignore_errors: "{{ ansible_check_mode }}"
9595
when:
9696
- nginx_app_protect_install_threat_campaigns | bool
97-
- nginx_license_status is not defined
97+
- nginx_app_protect_license_status is not defined
9898
notify: (Handler - NGINX App Protect) Run NGINX

tasks/waf/install-redhat.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
update_cache: true
4848
allow_downgrade: true
4949
ignore_errors: "{{ ansible_check_mode }}"
50-
when: nginx_license_status is not defined
50+
when: nginx_app_protect_license_status is not defined
5151
notify: (Handler - NGINX App Protect) Run NGINX
5252

5353
- name: (Amazon Linux/CentOS/RHEL) Install NGINX App Protect WAF signatures {{ nginx_app_protect_signatures_version is defined | ternary(nginx_app_protect_signatures_version, '') }}
@@ -59,7 +59,7 @@
5959
ignore_errors: "{{ ansible_check_mode }}"
6060
when:
6161
- nginx_app_protect_install_signatures | bool
62-
- nginx_license_status is not defined
62+
- nginx_app_protect_license_status is not defined
6363
notify: (Handler - NGINX App Protect) Run NGINX
6464

6565
- name: (Amazon Linux/CentOS/RHEL) Install NGINX App Protect WAF threat campaigns {{ nginx_app_protect_threat_campaigns_version is defined | ternary(nginx_app_protect_threat_campaigns_version, '') }}
@@ -71,5 +71,5 @@
7171
ignore_errors: "{{ ansible_check_mode }}"
7272
when:
7373
- nginx_app_protect_install_threat_campaigns | bool
74-
- nginx_license_status is not defined
74+
- nginx_app_protect_license_status is not defined
7575
notify: (Handler - NGINX App Protect) Run NGINX

0 commit comments

Comments
 (0)