|
1 | 1 | --- |
2 | | -- name: (Debian/Ubuntu) {{ nginx_app_protect_license_status is defined | ternary('Remove', 'Configure') }} NGINX App Protect license |
| 2 | + |
| 3 | +- name: (Debian/Ubuntu) {{ nginx_app_protect_license_status is defined | ternary('Remove', 'Configure') }} NGINX Plus license |
3 | 4 | blockinfile: |
4 | 5 | path: /etc/apt/apt.conf.d/90nginx |
| 6 | + create: yes |
| 7 | + block: | |
| 8 | + Acquire::https::{{ (nginx_plus_repository | default(nginx_plus_default_repository_debian)) | regex_search('(?<=https://)[^/]*') }}::Verify-Peer "true"; |
| 9 | + Acquire::https::{{ (nginx_plus_repository | default(nginx_plus_default_repository_debian)) | regex_search('(?<=https://)[^/]*') }}::Verify-Host "true"; |
| 10 | + Acquire::https::{{ (nginx_plus_repository | default(nginx_plus_default_repository_debian)) | regex_search('(?<=https://)[^/]*') }}::SslCert "/etc/ssl/nginx/nginx-repo.crt"; |
| 11 | + Acquire::https::{{ (nginx_plus_repository | default(nginx_plus_default_repository_debian)) | regex_search('(?<=https://)[^/]*') }}::SslKey "/etc/ssl/nginx/nginx-repo.key"; |
| 12 | + state: "{{ nginx_license_status | default ('present') }}" |
| 13 | + mode: 0444 |
| 14 | + |
| 15 | +- name: (Debian/Ubuntu) {{ nginx_app_protect_license_status is defined | ternary('Remove', 'Configure') }} NGINX App Protect license |
| 16 | + blockinfile: |
| 17 | + path: /etc/apt/apt.conf.d/90app-protect |
5 | 18 | create: true |
6 | 19 | block: | |
7 | | - Acquire::https::plus-pkgs.nginx.com::Verify-Peer "true"; |
8 | | - Acquire::https::plus-pkgs.nginx.com::Verify-Host "true"; |
9 | | - Acquire::https::plus-pkgs.nginx.com::SslCert "/etc/ssl/nginx/nginx-repo.crt"; |
10 | | - Acquire::https::plus-pkgs.nginx.com::SslKey "/etc/ssl/nginx/nginx-repo.key"; |
| 20 | + Acquire::https::{{ (nginx_app_protect_repository | default(nginx_app_protect_default_repository_debian)) | regex_search('(?<=https://)[^/]*') }}::Verify-Peer "true"; |
| 21 | + Acquire::https::{{ (nginx_app_protect_repository | default(nginx_app_protect_default_repository_debian)) | regex_search('(?<=https://)[^/]*') }}::Verify-Host "true"; |
| 22 | + Acquire::https::{{ (nginx_app_protect_repository | default(nginx_app_protect_default_repository_debian)) | regex_search('(?<=https://)[^/]*') }}::SslCert "/etc/ssl/nginx/nginx-repo.crt"; |
| 23 | + Acquire::https::{{ (nginx_app_protect_repository | default(nginx_app_protect_default_repository_debian)) | regex_search('(?<=https://)[^/]*') }}::SslKey "/etc/ssl/nginx/nginx-repo.key"; |
11 | 24 | state: "{{ nginx_app_protect_license_status | default ('present') }}" |
12 | 25 | mode: 0444 |
13 | 26 |
|
|
25 | 38 | when: nginx_app_protect_install_signatures | bool |
26 | 39 | or nginx_app_protect_install_threat_campaigns | bool |
27 | 40 |
|
| 41 | +- name: (Debian/Ubuntu) {{ nginx_app_protect_license_status is defined | ternary('Remove', 'Configure') }} NGINX Plus repository |
| 42 | + apt_repository: |
| 43 | + repo: "{{ nginx_plus_repository | default(nginx_plus_default_repository_debian) }}" |
| 44 | + filename: nginx-plus |
| 45 | + mode: 0644 |
| 46 | + update_cache: false |
| 47 | + state: "{{ nginx_app_protect_license_status | default ('present') }}" |
| 48 | + |
28 | 49 | - name: (Debian/Ubuntu) {{ nginx_app_protect_license_status is defined | ternary('Remove', 'Configure') }} NGINX App Protect repository |
29 | 50 | apt_repository: |
30 | 51 | repo: "{{ nginx_app_protect_repository | default(nginx_app_protect_default_repository_debian) }}" |
|
0 commit comments