|
14 | 14 | - chkconfig |
15 | 15 | state: present |
16 | 16 | when: |
17 | | - - ansible_service_mgr == 'systemd' |
18 | | - - ansible_os_family == 'RedHat' |
19 | | - - ansible_distribution_version.split(".")[0] >= '9' |
| 17 | + - ansible_facts.service_mgr == 'systemd' |
| 18 | + - ansible_facts.os_family == 'RedHat' |
| 19 | + - ansible_facts.distribution_version.split(".")[0] >= '9' |
20 | 20 |
|
21 | 21 | - name: Ensure service wrapper is installed for RHEL 7 & 8. |
22 | 22 | package: |
|
25 | 25 | - chkconfig |
26 | 26 | state: present |
27 | 27 | when: |
28 | | - - ansible_service_mgr == 'systemd' |
29 | | - - ansible_os_family == 'RedHat' |
30 | | - - ansible_distribution_version.split(".")[0] <= '8' |
| 28 | + - ansible_facts.service_mgr == 'systemd' |
| 29 | + - ansible_facts.os_family == 'RedHat' |
| 30 | + - ansible_facts.distribution_version.split(".")[0] <= '8' |
31 | 31 |
|
32 | 32 | - name: Ensure service wrapper is installed for Debian-based distributions. |
33 | 33 | package: |
34 | 34 | name: init-system-helpers |
35 | 35 | state: present |
36 | 36 | when: |
37 | | - - ansible_service_mgr == 'systemd' |
38 | | - - ansible_os_family == 'Debian' |
| 37 | + - ansible_facts.service_mgr == 'systemd' |
| 38 | + - ansible_facts.os_family == 'Debian' |
39 | 39 |
|
40 | 40 | # We add '-n' to Solr versions beyond 6.3.0 to prevent autostart on install. |
41 | 41 | - name: Run Solr installation script. |
|
56 | 56 | - name: Ensure solr is stopped (RHEL 7+ workaround). |
57 | 57 | command: service {{ solr_service_name }} stop |
58 | 58 | when: |
59 | | - - ansible_os_family == 'RedHat' |
60 | | - - ansible_distribution_version.split(".")[0] >= '7' |
| 59 | + - ansible_facts.os_family == 'RedHat' |
| 60 | + - ansible_facts.distribution_version.split(".")[0] >= '7' |
61 | 61 | - solr_install_script_result.changed |
62 | 62 | failed_when: false |
63 | 63 | tags: ['skip_ansible_lint'] |
|
67 | 67 | name: solr |
68 | 68 | daemon_reload: true |
69 | 69 | when: |
70 | | - - ansible_os_family == 'RedHat' |
71 | | - - ansible_distribution_version.split(".")[0] >= '7' |
| 70 | + - ansible_facts.os_family == 'RedHat' |
| 71 | + - ansible_facts.distribution_version.split(".")[0] >= '7' |
72 | 72 | - solr_install_script_result.changed |
73 | 73 | tags: ['skip_ansible_lint'] |
0 commit comments