Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace nginx_license_status with the correct variable #147

Merged
merged 2 commits into from
Oct 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ BREAKING CHANGES:

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.

BUG FIXES:

Fix instances of `nginx_app_protect_license_status` being incorrectly set as `nginx_license_status` instead.

## 0.6.2 (October 25, 2021)

ENHANCEMENTS:
Expand Down
4 changes: 2 additions & 2 deletions tasks/dos/install-debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Acquire::https::{{ (nginx_plus_repository | default(nginx_plus_default_repository_debian)) | regex_search('(?<=https://)[^/]*') }}::Verify-Host "true";
Acquire::https::{{ (nginx_plus_repository | default(nginx_plus_default_repository_debian)) | regex_search('(?<=https://)[^/]*') }}::SslCert "/etc/ssl/nginx/nginx-repo.crt";
Acquire::https::{{ (nginx_plus_repository | default(nginx_plus_default_repository_debian)) | regex_search('(?<=https://)[^/]*') }}::SslKey "/etc/ssl/nginx/nginx-repo.key";
state: "{{ nginx_license_status | default ('present') }}"
state: "{{ nginx_app_protect_license_status | default ('present') }}"
mode: 0444

- name: (Debian/Ubuntu) {{ nginx_app_protect_license_status is defined | ternary('Remove', 'Configure') }} NGINX App Protect DoS license
Expand Down Expand Up @@ -45,5 +45,5 @@
state: "{{ nginx_app_protect_dos_state }}"
update_cache: true
ignore_errors: "{{ ansible_check_mode }}"
when: nginx_license_status is not defined
when: nginx_app_protect_license_status is not defined
notify: (Handler - NGINX App Protect) Run NGINX
2 changes: 1 addition & 1 deletion tasks/dos/install-redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
update_cache: true
allow_downgrade: true
ignore_errors: "{{ ansible_check_mode }}"
when: nginx_license_status is not defined
when: nginx_app_protect_license_status is not defined
notify: (Handler - NGINX App Protect) Run NGINX
18 changes: 9 additions & 9 deletions tasks/waf/install-alpine.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
---
- name: (Alpine Linux) {{ nginx_license_status is defined | ternary('Remove', 'Configure') }} NGINX Plus repository
- name: (Alpine Linux) {{ nginx_app_protect_license_status is defined | ternary('Remove', 'Configure') }} NGINX Plus repository
lineinfile:
path: /etc/apk/repositories
insertafter: EOF
line: "{{ nginx_plus_repository | default(nginx_plus_default_repository_alpine) }}"
state: "{{ nginx_license_status | default ('present') }}"
state: "{{ nginx_app_protect_license_status | default ('present') }}"
when: nginx_app_protect_manage_repo | bool

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

- name: (Alpine Linux) {{ nginx_license_status is defined | ternary('Remove', 'Configure') }} NGINX App Protect WAF security updates repository
- name: (Alpine Linux) {{ nginx_app_protect_license_status is defined | ternary('Remove', 'Configure') }} NGINX App Protect WAF security updates repository
lineinfile:
path: /etc/apk/repositories
insertafter: EOF
line: "{{ nginx_app_protect_security_updates_repository | default(nginx_app_protect_security_updates_default_repository_alpine) }}"
state: "{{ nginx_license_status | default ('present') }}"
state: "{{ nginx_app_protect_license_status | default ('present') }}"
when:
- (nginx_app_protect_install_signatures | bool) or (nginx_app_protect_install_threat_campaigns | bool)
- nginx_app_protect_manage_repo | bool
Expand All @@ -31,7 +31,7 @@
state: "{{ nginx_app_protect_waf_state }}"
update_cache: true
ignore_errors: "{{ ansible_check_mode }}"
when: nginx_license_status is not defined
when: nginx_app_protect_license_status is not defined
notify: (Handler - NGINX App Protect) Run NGINX

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

- 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, '') }}
Expand All @@ -53,5 +53,5 @@
ignore_errors: "{{ ansible_check_mode }}"
when:
- nginx_app_protect_install_threat_campaigns | bool
- nginx_license_status is not defined
- nginx_app_protect_license_status is not defined
notify: (Handler - NGINX App Protect) Run NGINX
8 changes: 4 additions & 4 deletions tasks/waf/install-debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Acquire::https::{{ (nginx_plus_repository | default(nginx_plus_default_repository_debian)) | regex_search('(?<=https://)[^/]*') }}::Verify-Host "true";
Acquire::https::{{ (nginx_plus_repository | default(nginx_plus_default_repository_debian)) | regex_search('(?<=https://)[^/]*') }}::SslCert "/etc/ssl/nginx/nginx-repo.crt";
Acquire::https::{{ (nginx_plus_repository | default(nginx_plus_default_repository_debian)) | regex_search('(?<=https://)[^/]*') }}::SslKey "/etc/ssl/nginx/nginx-repo.key";
state: "{{ nginx_license_status | default ('present') }}"
state: "{{ nginx_app_protect_license_status | default ('present') }}"
mode: 0444

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

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

- 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, '') }}
Expand All @@ -94,5 +94,5 @@
ignore_errors: "{{ ansible_check_mode }}"
when:
- nginx_app_protect_install_threat_campaigns | bool
- nginx_license_status is not defined
- nginx_app_protect_license_status is not defined
notify: (Handler - NGINX App Protect) Run NGINX
6 changes: 3 additions & 3 deletions tasks/waf/install-redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
update_cache: true
allow_downgrade: true
ignore_errors: "{{ ansible_check_mode }}"
when: nginx_license_status is not defined
when: nginx_app_protect_license_status is not defined
notify: (Handler - NGINX App Protect) Run NGINX

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

- 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, '') }}
Expand All @@ -71,5 +71,5 @@
ignore_errors: "{{ ansible_check_mode }}"
when:
- nginx_app_protect_install_threat_campaigns | bool
- nginx_license_status is not defined
- nginx_app_protect_license_status is not defined
notify: (Handler - NGINX App Protect) Run NGINX