Skip to content

Commit d9beb7e

Browse files
committed
remove requirement that N+ is installed beforehand
1 parent 86773b1 commit d9beb7e

File tree

3 files changed

+4
-19
lines changed

3 files changed

+4
-19
lines changed

tasks/install-app-protect.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,16 @@
55
nginx_plus_version: "{{ ansible_facts.packages['nginx-plus'] | map(attribute='version') | list | first | regex_search('^(\\d{1,3})') }}"
66
when: "'nginx-plus' in ansible_facts.packages"
77

8-
- name: Debug nginx plus version
9-
debug:
10-
msg: "nginx_plus_version {{ nginx_plus_version }}"
11-
verbosity: 2
12-
13-
- name: Fail if NGINX+ version preconditions fail
8+
- name: Fail if existing NGINX+ version preconditions fail
149
assert:
1510
that:
16-
- nginx_plus_version is defined
1711
- nginx_plus_version | int >= 19
1812
fail_msg: >
1913
"'nginx_plus_version' release version must be a minimum of 19 for App Protect.
2014
Actual: {{ (nginx_plus_version is defined) | ternary(nginx_plus_version, 'NONE') }}"
2115
success_msg: "'nginx_plus_version' is {{ (nginx_plus_version is defined) | ternary(nginx_plus_version, 'NONE') }}"
2216
quiet: true
17+
when: nginx_plus_version is defined
2318

2419
- name: "(Install: Linux) Create override for NGINX Plus service"
2520
file:

tasks/install-signatures.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,16 @@
55
nginx_plus_version: "{{ ansible_facts.packages['nginx-plus'] | map(attribute='version') | list | first | regex_search('^(\\d{1,3})') }}"
66
when: "'nginx-plus' in ansible_facts.packages"
77

8-
- name: Debug nginx plus version
9-
debug:
10-
msg: "nginx_plus_version {{ nginx_plus_version }}"
11-
verbosity: 2
12-
138
- name: Fail if NGINX+ version preconditions fail
149
assert:
1510
that:
16-
- nginx_plus_version is defined
1711
- nginx_plus_version | int >= 19
1812
fail_msg: >
1913
"'nginx_plus_version' release version must be a minimum of 19 for App Protect.
2014
Actual: {{ (nginx_plus_version is defined) | ternary(nginx_plus_version, 'NONE') }}"
2115
success_msg: "'nginx_plus_version' is {{ (nginx_plus_version is defined) | ternary(nginx_plus_version, 'NONE') }}"
2216
quiet: true
17+
when: nginx_plus_version is defined
2318

2419
- name: "(Install: Linux) Install Latest NGINX App Protect Signatures"
2520
package:

tasks/install-threat-campaigns.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,16 @@
55
nginx_plus_version: "{{ ansible_facts.packages['nginx-plus'] | map(attribute='version') | list | first | regex_search('^(\\d{1,3})') }}"
66
when: "'nginx-plus' in ansible_facts.packages"
77

8-
- name: Debug nginx plus version
9-
debug:
10-
msg: "nginx_plus_version {{ nginx_plus_version }}"
11-
verbosity: 2
12-
138
- name: Fail if NGINX+ version preconditions fail
149
assert:
1510
that:
16-
- nginx_plus_version is defined
1711
- nginx_plus_version | int >= 19
1812
fail_msg: >
1913
"'nginx_plus_version' release version must be a minimum of 19 for App Protect.
2014
Actual: {{ (nginx_plus_version is defined) | ternary(nginx_plus_version, 'NONE') }}"
2115
success_msg: "'nginx_plus_version' is {{ (nginx_plus_version is defined) | ternary(nginx_plus_version, 'NONE') }}"
2216
quiet: true
17+
when: nginx_plus_version is defined
2318

2419
- name: "(Install: Linux) Install Latest NGINX App Protect Threat Campaigns"
2520
package:

0 commit comments

Comments
 (0)