|
1 | 1 | ---
|
2 |
| -- name: "(Setup: CentOS/RedHat/Oracle Linux) Setup NGINX App Protect Repository" |
3 |
| - yum_repository: |
4 |
| - name: nginx-app-protect |
5 |
| - baseurl: >- |
6 |
| - https://plus-pkgs.nginx.com/centos/{{ (ansible_distribution_version | float >= 7.4 and ansible_distribution_version | float < 8.0) |
7 |
| - | ternary(ansible_distribution_major_version | int, 7.4) }}/$basearch/ |
8 |
| - description: NGINX App Protect Repository |
9 |
| - sslclientcert: "/etc/ssl/nginx/{{ nginx_license.certificate | basename }}" |
10 |
| - sslclientkey: "/etc/ssl/nginx/{{ nginx_license.key | basename }}" |
11 |
| - enabled: true |
12 |
| - gpgcheck: true |
13 |
| - state: "{{ nginx_license_status | default ('present') }}" |
14 |
| - when: ansible_distribution != "Amazon" |
| 2 | +- name: "(Setup: CentOS/RedHat/Oracle Linux) Setup Repos" |
| 3 | + block: |
| 4 | + |
| 5 | + - name: "(Setup: CentOS/RedHat/Oracle Linux) Get OS Major Version" |
| 6 | + set_fact: |
| 7 | + key_value: "" # appeasing the linter |
| 8 | + redhat_major_version: "{{ (ansible_distribution_version | float >= 7.4 and ansible_distribution_version | float < 8.0) |
| 9 | + | ternary(ansible_distribution_major_version | int, 7.4) }}" |
| 10 | + |
| 11 | + - name: "(Setup: CentOS/RedHat/Oracle Linux) Setup CentOS-7 Repository" |
| 12 | + yum_repository: |
| 13 | + name: centos |
| 14 | + baseurl: >- |
| 15 | + http://ftp.heanet.ie/pub/centos/{{ redhat_major_version }}/os/$basearch/ |
| 16 | + description: NGINX App Protect Repository |
| 17 | + sslclientcert: "/etc/ssl/nginx/{{ nginx_license.certificate | basename }}" |
| 18 | + sslclientkey: "/etc/ssl/nginx/{{ nginx_license.key | basename }}" |
| 19 | + enabled: true |
| 20 | + gpgcheck: true |
| 21 | + gpgkey: >- |
| 22 | + http://ftp.heanet.ie/pub/centos/{{ redhat_major_version }}/os/$basearch/RPM-GPG-KEY-CentOS-{{ redhat_major_version }} |
| 23 | + state: "{{ nginx_license_status | default ('present') }}" |
| 24 | + |
| 25 | + - name: "(Setup: CentOS/RedHat/Oracle Linux) Setup NGINX App Protect Repository" |
| 26 | + yum_repository: |
| 27 | + name: nginx-app-protect |
| 28 | + baseurl: >- |
| 29 | + https://plus-pkgs.nginx.com/centos/{{ redhat_major_version }}/$basearch/ |
| 30 | + description: NGINX App Protect Repository |
| 31 | + sslclientcert: "/etc/ssl/nginx/{{ nginx_license.certificate | basename }}" |
| 32 | + sslclientkey: "/etc/ssl/nginx/{{ nginx_license.key | basename }}" |
| 33 | + enabled: true |
| 34 | + gpgcheck: true |
| 35 | + state: "{{ nginx_license_status | default ('present') }}" |
15 | 36 |
|
16 |
| -- name: "(Setup: CentOS/RedHat/Oracle Linux) Setup NGINX App Protect Signatures Repository" |
17 |
| - yum_repository: |
18 |
| - name: nginx-app-protect-signatures |
19 |
| - baseurl: >- |
20 |
| - https://app-protect-sigs.nginx.com/centos/{{ (ansible_distribution_version | float >= 7.4 and ansible_distribution_version | float < 8.0) |
21 |
| - | ternary(ansible_distribution_major_version | int, 7.4) }}/$basearch/ |
22 |
| - description: NGINX App Protect Signatures Repository |
23 |
| - sslclientcert: "/etc/ssl/nginx/{{ nginx_license.certificate | basename }}" |
24 |
| - sslclientkey: "/etc/ssl/nginx/{{ nginx_license.key | basename }}" |
25 |
| - enabled: true |
26 |
| - gpgcheck: true |
27 |
| - state: "{{ nginx_license_status | default ('present') }}" |
| 37 | + - name: "(Setup: CentOS/RedHat/Oracle Linux) Setup NGINX App Protect Signatures Repository" |
| 38 | + yum_repository: |
| 39 | + name: nginx-app-protect-signatures |
| 40 | + baseurl: >- |
| 41 | + https://app-protect-sigs.nginx.com/centos/{{ redhat_major_version }}/$basearch/ |
| 42 | + description: NGINX App Protect Signatures Repository |
| 43 | + sslclientcert: "/etc/ssl/nginx/{{ nginx_license.certificate | basename }}" |
| 44 | + sslclientkey: "/etc/ssl/nginx/{{ nginx_license.key | basename }}" |
| 45 | + enabled: true |
| 46 | + gpgcheck: true |
| 47 | + state: "{{ nginx_license_status | default ('present') }}" |
28 | 48 | when: ansible_distribution != "Amazon"
|
0 commit comments