File tree Expand file tree Collapse file tree 13 files changed +28
-27
lines changed
.github/workflows/requirements Expand file tree Collapse file tree 13 files changed +28
-27
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
offline: true
3
3
skip_list:
4
+ - name[template]
4
5
- yaml[line-length]
Original file line number Diff line number Diff line change 1
1
ansible-core==2.13.4
2
2
Jinja2==3.1.2
3
- ansible-lint==6.5.2
3
+ ansible-lint==6.7.0
4
4
yamllint==1.28.0
5
5
molecule[docker]==4.0.1
6
6
docker==6.0.0
Original file line number Diff line number Diff line change 21
21
22
22
* Update GitHub actions to only skip \* plus\* scenarios when the NGINX Plus license secrets are not present (it used to only run the NGINX Plus test scenarios during internal PRs).
23
23
* Remove Yamllint (Ansible Lint now incorporates Yamllint).
24
- * Skip Ansible Lint line length rule .
24
+ * Skip Ansible Lint line length and no templates in name rules. Slightly refactor code to incorporate changes added to Ansible Lint 6.7.0 .
25
25
26
26
## 0.8.0 (April 6, 2022)
27
27
Original file line number Diff line number Diff line change 3
3
hosts : localhost
4
4
gather_facts : false
5
5
tasks :
6
- - name : Create ephemeral license certificate file from b64 decoded env var
6
+ - name : Create ephemeral license certificate file from b64 decoded env var # noqa template-instead-of-copy
7
7
ansible.builtin.copy :
8
8
content : " {{ lookup('env', 'NGINX_CRT') | b64decode }}"
9
9
dest : ../../files/license/nginx-repo.crt
10
10
force : false
11
11
mode : 0444
12
12
13
- - name : Create ephemeral license key file from b64 decoded env var
13
+ - name : Create ephemeral license key file from b64 decoded env var # noqa template-instead-of-copy
14
14
ansible.builtin.copy :
15
15
content : " {{ lookup('env', 'NGINX_KEY') | b64decode }}"
16
16
dest : ../../files/license/nginx-repo.key
Original file line number Diff line number Diff line change 3
3
hosts : localhost
4
4
gather_facts : false
5
5
tasks :
6
- - name : Create ephemeral license certificate file from b64 decoded env var
6
+ - name : Create ephemeral license certificate file from b64 decoded env var # noqa template-instead-of-copy
7
7
ansible.builtin.copy :
8
8
content : " {{ lookup('env', 'NGINX_CRT') | b64decode }}"
9
9
dest : ../../files/license/nginx-repo.crt
10
10
force : false
11
11
mode : 0444
12
12
13
- - name : Create ephemeral license key file from b64 decoded env var
13
+ - name : Create ephemeral license key file from b64 decoded env var # noqa template-instead-of-copy
14
14
ansible.builtin.copy :
15
15
content : " {{ lookup('env', 'NGINX_KEY') | b64decode }}"
16
16
dest : ../../files/license/nginx-repo.key
Original file line number Diff line number Diff line change 5
5
tasks :
6
6
- name : Create ephemeral license certificate file from b64 decoded env var
7
7
ansible.builtin.copy :
8
- content : " {{ lookup('env', 'NGINX_CRT') | b64decode }}"
8
+ content : " {{ lookup('env', 'NGINX_CRT') | b64decode }}" # noqa template-instead-of-copy
9
9
dest : ../../files/license/nginx-repo.crt
10
10
force : false
11
11
mode : 0444
12
12
13
13
- name : Create ephemeral license key file from b64 decoded env var
14
14
ansible.builtin.copy :
15
- content : " {{ lookup('env', 'NGINX_KEY') | b64decode }}"
15
+ content : " {{ lookup('env', 'NGINX_KEY') | b64decode }}" # noqa template-instead-of-copy
16
16
dest : ../../files/license/nginx-repo.key
17
17
force : false
18
18
mode : 0444
Original file line number Diff line number Diff line change 1
1
---
2
2
- name : Copy NGINX App Protect security policy files
3
+ when : nginx_app_protect_security_policy_file_enable | bool
3
4
block :
4
5
- name : Ensure NGINX App Protect security policy directories exist
5
6
ansible.builtin.file :
15
16
backup : true
16
17
mode : 0644
17
18
loop : " {{ nginx_app_protect_security_policy_file }}"
18
- when : nginx_app_protect_security_policy_file_enable | bool
19
19
20
20
- name : Copy NGINX App Protect log policy files
21
+ when : nginx_app_protect_log_policy_file_enable | bool
21
22
block :
22
23
- name : Ensure NGINX App Protect log policy directories exist
23
24
ansible.builtin.file :
33
34
backup : true
34
35
mode : 0644
35
36
loop : " {{ nginx_app_protect_log_policy_file }}"
36
- when : nginx_app_protect_log_policy_file_enable | bool
Original file line number Diff line number Diff line change 1
1
---
2
2
- name : Modify NGINX Plus service
3
+ when :
4
+ - ansible_service_mgr == "systemd"
5
+ - nginx_app_protect_service_modify | bool
3
6
block :
4
7
- name : Create override for NGINX Plus service
5
8
ansible.builtin.file :
15
18
group : root
16
19
mode : 0644
17
20
notify : (Handler - NGINX App Protect) Systemd daemon-reload
18
- when :
19
- - ansible_service_mgr == "systemd"
20
- - nginx_app_protect_service_modify | bool
Original file line number Diff line number Diff line change 1
1
---
2
2
- name : (Alpine Linux) Set up NGINX App Protect WAF/DoS license
3
+ when : ansible_os_family == "Alpine"
3
4
block :
4
5
- name : Install cryptography package
5
6
ansible.builtin.package :
42
43
- cert.public_key == key.public_key
43
44
success_msg : Your NGINX App Protect WAF/DoS license is valid!
44
45
fail_msg : Something went wrong! Make sure your App Protect WAF/DoS license is valid!
45
- when : ansible_os_family == "Alpine"
46
46
47
47
- name : (Debian/Red Hat OSs) Set up NGINX App Protect WAF/DoS license
48
+ when : ansible_os_family != "Alpine"
48
49
block :
49
50
- name : (Debian/Red Hat OSs) Create SSL directory
50
51
ansible.builtin.file :
83
84
- cert.public_key == key.public_key
84
85
success_msg : Your NGINX App Protect WAF/DoS license is valid!
85
86
fail_msg : Something went wrong! Make sure your NGINX App Protect WAF/DoS license is valid!
86
- when : ansible_os_family != "Alpine"
Original file line number Diff line number Diff line change 1
1
---
2
2
- name : (Alpine Linux) Set up NGINX App Protect DoS signing key
3
+ when : ansible_os_family == "Alpine"
3
4
block :
4
5
- name : (Alpine Linux) Set up NGINX App Protect DoS signing key URL
5
6
ansible.builtin.set_fact :
10
11
url : " {{ keysite }}"
11
12
dest : /etc/apk/keys/nginx_signing.rsa.pub
12
13
mode : 0400
13
- when : ansible_os_family == "Alpine"
14
14
15
15
- name : (Debian/Ubuntu) Set up NGINX App Protect and security updates signing key
16
+ when : ansible_os_family == "Debian"
16
17
block :
17
18
- name : (Debian/Ubuntu) Add NGINX Plus signing key
18
19
ansible.builtin.apt_key :
24
25
keyring : /usr/share/keyrings/nginx-archive-keyring.gpg
25
26
url : " {{ nginx_app_protect_waf_signing_key.waf_security_updates | default(nginx_app_protect_waf_security_updates_default_signing_key_pgp) }}"
26
27
when : (nginx_app_protect_waf_install_signatures | bool) or (nginx_app_protect_waf_install_threat_campaigns | bool)
27
- when : ansible_os_family == "Debian"
28
28
29
29
- name : (Amazon Linux/CentOS/RHEL) Set up NGINX App Protect and security updates signing key
30
+ when : ansible_os_family == "RedHat"
30
31
block :
31
32
- name : (CentOS/RHEL) Add NGINX Plus signing key
32
33
ansible.builtin.rpm_key :
36
37
ansible.builtin.rpm_key :
37
38
key : " {{ nginx_app_protect_waf_signing_key.waf_security_updates | default(nginx_app_protect_waf_security_updates_default_signing_key_pgp) }}"
38
39
when : (nginx_app_protect_waf_install_signatures | bool) or (nginx_app_protect_waf_install_threat_campaigns | bool)
39
- when : ansible_os_family == "RedHat"
You can’t perform that action at this time.
0 commit comments