|
1 | 1 | --- |
2 | | -- name: "Enable repositories on CentOS & RHEL 8." |
| 2 | +- name: "{{ ansible_os_family }} Derivatives: Enable repositories on CentOS & RHEL 8." |
3 | 3 | when: | |
4 | 4 | (ansible_facts.distribution == "RedHat" or ansible_facts.distribution == "CentOS" or ansible_facts.distribution == "OracleLinux") |
5 | 5 | and ansible_facts.distribution_major_version == "8" |
6 | 6 | block: |
7 | | - - name: "Download EPEL GPG Key on CentOS & RHEL 8." |
| 7 | + - name: "{{ ansible_os_family }} Derivatives: Download EPEL GPG Key on CentOS & RHEL 8." |
8 | 8 | ansible.builtin.get_url: |
9 | 9 | url: "{{ __checkmk_server_epel_gpg_key }}" |
10 | 10 | dest: "{{ __checkmk_server_tmp_dir }}/EPEL-pubkey.gpg" |
|
14 | 14 | - download-gpg-key |
15 | 15 | - enable-repos |
16 | 16 |
|
17 | | - - name: "Import Checkmk GPG Key on RHEL 8." |
| 17 | + - name: "{{ ansible_os_family }} Derivatives: Import Checkmk GPG Key on RHEL 8." |
18 | 18 | become: true |
19 | 19 | ansible.builtin.rpm_key: |
20 | 20 | key: "{{ __checkmk_server_tmp_dir }}/EPEL-pubkey.gpg" |
|
24 | 24 | - import-gpg-key |
25 | 25 | - enable-repos |
26 | 26 |
|
27 | | - - name: "Install epel-release from URL on CentOS & RHEL 8." |
| 27 | + - name: "{{ ansible_os_family }} Derivatives: Install epel-release from URL on CentOS & RHEL 8." |
28 | 28 | become: true |
29 | 29 | ansible.builtin.package: |
30 | 30 | name: "{{ __checkmk_server_epel_url }}" |
|
33 | 33 | tags: |
34 | 34 | - enable-repos |
35 | 35 |
|
36 | | -- name: "Enable CodeReady Linux Builder repo on RHEL 8." |
| 36 | +- name: "{{ ansible_os_family }} Derivatives: Enable CodeReady Linux Builder repo on RHEL 8." |
37 | 37 | become: true |
38 | 38 | community.general.rhsm_repository: |
39 | 39 | name: "codeready-builder-for-rhel-{{ ansible_facts.distribution_major_version }}-x86_64-rpms" |
|
44 | 44 | ansible_facts.distribution == "RedHat" |
45 | 45 | and ansible_facts.distribution_major_version == "8" |
46 | 46 |
|
47 | | -- name: "Enable powertools repository on CentOS 8." # noqa no-changed-when |
| 47 | +- name: "{{ ansible_os_family }} Derivatives: Enable powertools repository on CentOS 8." # noqa no-changed-when |
48 | 48 | become: true |
49 | 49 | ansible.builtin.shell: dnf config-manager --set-enabled powertools # noqa command-instead-of-shell |
50 | 50 | when: | # RHEL needs epel and a package URL |
|
53 | 53 | tags: |
54 | 54 | - enable-repos |
55 | 55 |
|
56 | | -- name: "Enable codeready builder repository on OracleLinux 8." # noqa no-changed-when |
| 56 | +- name: "{{ ansible_os_family }} Derivatives: Enable codeready builder repository on OracleLinux 8." # noqa no-changed-when |
57 | 57 | become: true |
58 | 58 | ansible.builtin.shell: dnf config-manager --set-enabled ol8_codeready_builder # noqa command-instead-of-shell |
59 | 59 | when: | # RHEL needs epel and a package URL |
|
62 | 62 | tags: |
63 | 63 | - enable-repos |
64 | 64 |
|
65 | | -- name: "Enable powertools repository on RHEL 7." |
| 65 | +- name: "{{ ansible_os_family }} Derivatives: Enable powertools repository on RHEL 7." |
66 | 66 | become: true |
67 | 67 | community.general.rhsm_repository: |
68 | 68 | name: "{{ item }}" |
|
76 | 76 | tags: |
77 | 77 | - enable-repos |
78 | 78 |
|
79 | | -- name: "Install Checkmk Server." |
| 79 | +- name: "{{ ansible_os_family }} Derivatives: Install Checkmk Server." |
80 | 80 | when: not 'check-mk-' + __checkmk_server_edition_mapping[checkmk_server_edition] + '-' +checkmk_server_version in ansible_facts.packages |
81 | 81 | become: true |
82 | 82 | ansible.builtin.package: |
|
87 | 87 | tags: |
88 | 88 | - install-package |
89 | 89 |
|
90 | | -- name: "Enable httpd can network connect selinux boolean." |
| 90 | +- name: "{{ ansible_os_family }} Derivatives: Enable httpd can network connect selinux boolean." |
91 | 91 | become: true |
92 | 92 | ansible.posix.seboolean: |
93 | 93 | name: httpd_can_network_connect |
|
0 commit comments