|
28 | 28 | # changed_when: false |
29 | 29 | # when: |
30 | 30 | # - metrics_query_service | d(false) | bool |
31 | | - # - ansible_distribution not in ['RedHat', 'CentOS'] or |
32 | | - # (ansible_distribution in ['RedHat', 'CentOS'] and |
33 | | - # ansible_distribution_major_version | int >= 10) |
| 31 | + # - ansible_facts['distribution'] not in ['RedHat', 'CentOS'] or |
| 32 | + # (ansible_facts['distribution'] in ['RedHat', 'CentOS'] and |
| 33 | + # ansible_facts['distribution_major_version'] | int >= 10) |
34 | 34 |
|
35 | 35 | - name: "Check firewall service status for redis; |
36 | 36 | metrics_manage_firewall is true" |
|
40 | 40 | changed_when: false |
41 | 41 | when: |
42 | 42 | - metrics_query_service|d(false)|bool |
43 | | - - ansible_distribution in ['RedHat', 'CentOS'] |
44 | | - - ansible_distribution_major_version | int > 6 |
45 | | - - ansible_distribution_major_version | int < 10 |
| 43 | + - ansible_facts['distribution'] in ['RedHat', 'CentOS'] |
| 44 | + - ansible_facts['distribution_major_version'] | int > 6 |
| 45 | + - ansible_facts['distribution_major_version'] | int < 10 |
46 | 46 |
|
47 | 47 | - name: "Check firewall port status for pmproxy; |
48 | 48 | metrics_manage_firewall is true" |
|
70 | 70 | changed_when: false |
71 | 71 | when: |
72 | 72 | - metrics_query_service | d(false) | bool |
73 | | - - ansible_distribution not in ['RedHat', 'CentOS'] or |
74 | | - (ansible_distribution in ['RedHat', 'CentOS'] and |
75 | | - ansible_distribution_major_version | int >= 10) |
| 73 | + - ansible_facts['distribution'] not in ['RedHat', 'CentOS'] or |
| 74 | + (ansible_facts['distribution'] in ['RedHat', 'CentOS'] and |
| 75 | + ansible_facts['distribution_major_version'] | int >= 10) |
76 | 76 |
|
77 | 77 | - name: Check associated selinux ports (metrics_manage_selinux is true) |
78 | 78 | shell: |- |
|
0 commit comments