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 11---
22offline: true
33skip_list:
4+ - name[template]
45 - yaml[line-length]
Original file line number Diff line number Diff line change 11ansible-core==2.13.4
22Jinja2==3.1.2
3- ansible-lint==6.5.2
3+ ansible-lint==6.7.0
44yamllint==1.28.0
55molecule[docker]==4.0.1
66docker==6.0.0
Original file line number Diff line number Diff line change 2121
2222* 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).
2323* 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 .
2525
2626## 0.8.0 (April 6, 2022)
2727
Original file line number Diff line number Diff line change 33 hosts : localhost
44 gather_facts : false
55 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
77 ansible.builtin.copy :
88 content : " {{ lookup('env', 'NGINX_CRT') | b64decode }}"
99 dest : ../../files/license/nginx-repo.crt
1010 force : false
1111 mode : 0444
1212
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
1414 ansible.builtin.copy :
1515 content : " {{ lookup('env', 'NGINX_KEY') | b64decode }}"
1616 dest : ../../files/license/nginx-repo.key
Original file line number Diff line number Diff line change 33 hosts : localhost
44 gather_facts : false
55 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
77 ansible.builtin.copy :
88 content : " {{ lookup('env', 'NGINX_CRT') | b64decode }}"
99 dest : ../../files/license/nginx-repo.crt
1010 force : false
1111 mode : 0444
1212
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
1414 ansible.builtin.copy :
1515 content : " {{ lookup('env', 'NGINX_KEY') | b64decode }}"
1616 dest : ../../files/license/nginx-repo.key
Original file line number Diff line number Diff line change 55 tasks :
66 - name : Create ephemeral license certificate file from b64 decoded env var
77 ansible.builtin.copy :
8- content : " {{ lookup('env', 'NGINX_CRT') | b64decode }}"
8+ content : " {{ lookup('env', 'NGINX_CRT') | b64decode }}" # noqa template-instead-of-copy
99 dest : ../../files/license/nginx-repo.crt
1010 force : false
1111 mode : 0444
1212
1313 - name : Create ephemeral license key file from b64 decoded env var
1414 ansible.builtin.copy :
15- content : " {{ lookup('env', 'NGINX_KEY') | b64decode }}"
15+ content : " {{ lookup('env', 'NGINX_KEY') | b64decode }}" # noqa template-instead-of-copy
1616 dest : ../../files/license/nginx-repo.key
1717 force : false
1818 mode : 0444
Original file line number Diff line number Diff line change 11---
22- name : Copy NGINX App Protect security policy files
3+ when : nginx_app_protect_security_policy_file_enable | bool
34 block :
45 - name : Ensure NGINX App Protect security policy directories exist
56 ansible.builtin.file :
1516 backup : true
1617 mode : 0644
1718 loop : " {{ nginx_app_protect_security_policy_file }}"
18- when : nginx_app_protect_security_policy_file_enable | bool
1919
2020- name : Copy NGINX App Protect log policy files
21+ when : nginx_app_protect_log_policy_file_enable | bool
2122 block :
2223 - name : Ensure NGINX App Protect log policy directories exist
2324 ansible.builtin.file :
3334 backup : true
3435 mode : 0644
3536 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 11---
22- name : Modify NGINX Plus service
3+ when :
4+ - ansible_service_mgr == "systemd"
5+ - nginx_app_protect_service_modify | bool
36 block :
47 - name : Create override for NGINX Plus service
58 ansible.builtin.file :
1518 group : root
1619 mode : 0644
1720 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 11---
22- name : (Alpine Linux) Set up NGINX App Protect WAF/DoS license
3+ when : ansible_os_family == "Alpine"
34 block :
45 - name : Install cryptography package
56 ansible.builtin.package :
4243 - cert.public_key == key.public_key
4344 success_msg : Your NGINX App Protect WAF/DoS license is valid!
4445 fail_msg : Something went wrong! Make sure your App Protect WAF/DoS license is valid!
45- when : ansible_os_family == "Alpine"
4646
4747- name : (Debian/Red Hat OSs) Set up NGINX App Protect WAF/DoS license
48+ when : ansible_os_family != "Alpine"
4849 block :
4950 - name : (Debian/Red Hat OSs) Create SSL directory
5051 ansible.builtin.file :
8384 - cert.public_key == key.public_key
8485 success_msg : Your NGINX App Protect WAF/DoS license is valid!
8586 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 11---
22- name : (Alpine Linux) Set up NGINX App Protect DoS signing key
3+ when : ansible_os_family == "Alpine"
34 block :
45 - name : (Alpine Linux) Set up NGINX App Protect DoS signing key URL
56 ansible.builtin.set_fact :
1011 url : " {{ keysite }}"
1112 dest : /etc/apk/keys/nginx_signing.rsa.pub
1213 mode : 0400
13- when : ansible_os_family == "Alpine"
1414
1515- name : (Debian/Ubuntu) Set up NGINX App Protect and security updates signing key
16+ when : ansible_os_family == "Debian"
1617 block :
1718 - name : (Debian/Ubuntu) Add NGINX Plus signing key
1819 ansible.builtin.apt_key :
2425 keyring : /usr/share/keyrings/nginx-archive-keyring.gpg
2526 url : " {{ nginx_app_protect_waf_signing_key.waf_security_updates | default(nginx_app_protect_waf_security_updates_default_signing_key_pgp) }}"
2627 when : (nginx_app_protect_waf_install_signatures | bool) or (nginx_app_protect_waf_install_threat_campaigns | bool)
27- when : ansible_os_family == "Debian"
2828
2929- name : (Amazon Linux/CentOS/RHEL) Set up NGINX App Protect and security updates signing key
30+ when : ansible_os_family == "RedHat"
3031 block :
3132 - name : (CentOS/RHEL) Add NGINX Plus signing key
3233 ansible.builtin.rpm_key :
3637 ansible.builtin.rpm_key :
3738 key : " {{ nginx_app_protect_waf_signing_key.waf_security_updates | default(nginx_app_protect_waf_security_updates_default_signing_key_pgp) }}"
3839 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