|
8 | 8 | until: network_access is success |
9 | 9 | retries: 10 |
10 | 10 | delay: 2 |
11 | | - when: collections_enabled and ansible_distribution == 'CentOS' |
| 11 | + when: collections_enabled|bool and ansible_distribution == 'CentOS' |
12 | 12 | tags: |
13 | 13 | - git |
14 | 14 | - base_git |
15 | 15 |
|
16 | 16 | - name: enable rhel software collections |
17 | 17 | command: "yum-config-manager --enable rhel-server-rhscl-{{ ansible_distribution_major_version }}-rpms" |
18 | | - when: collections_enabled and ansible_distribution == 'Red Hat Enterprise Linux' |
| 18 | + when: collections_enabled|bool and ansible_distribution == 'Red Hat Enterprise Linux' |
19 | 19 | tags: |
20 | 20 | - git |
21 | 21 | - base_git |
22 | 22 |
|
23 | 23 | - name: Install Git software collection |
24 | 24 | become: yes |
25 | | - when: collections_enabled and ansible_os_family == 'RedHat' |
| 25 | + when: collections_enabled|bool and ansible_os_family == 'RedHat' |
26 | 26 | yum: |
27 | 27 | name: "{{ base_git_rpms }}" |
28 | 28 | state: present |
|
40 | 40 | src: "/opt/rh/{{ base_git }}/enable" |
41 | 41 | path: /etc/profile.d/rh-git.sh |
42 | 42 | state: link |
43 | | - when: collections_enabled and ansible_os_family == 'RedHat' |
| 43 | + when: collections_enabled|bool and ansible_os_family == 'RedHat' |
44 | 44 | tags: |
45 | 45 | - git |
46 | 46 | - base_git |
|
49 | 49 | file: |
50 | 50 | path: /etc/profile.d/rh-git.sh |
51 | 51 | state: absent |
52 | | - when: not collections_enabled and ansible_os_family == 'RedHat' |
| 52 | + when: not collections_enabled|bool and ansible_os_family == 'RedHat' |
53 | 53 | tags: |
54 | 54 | - git |
55 | 55 |
|
56 | 56 | - name: Disable Git software collection |
57 | 57 | file: |
58 | 58 | path: /etc/profile.d/rh-git.sh |
59 | 59 | state: absent |
60 | | - when: not collections_enabled and ansible_os_family == 'RedHat' |
| 60 | + when: not collections_enabled|bool and ansible_os_family == 'RedHat' |
61 | 61 | tags: |
62 | 62 | - git |
63 | 63 |
|
64 | 64 | - name: Install Git from yum repo |
65 | 65 | become: yes |
66 | | - when: not collections_enabled and ansible_os_family == 'RedHat' |
| 66 | + when: not collections_enabled|bool and ansible_os_family == 'RedHat' |
67 | 67 | yum: |
68 | 68 | name: git |
69 | 69 | state: present |
|
95 | 95 | src: "/opt/rh/{{ base_git }}/enable" |
96 | 96 | path: /etc/profile.d/rh-git.sh |
97 | 97 | state: absent |
98 | | - when: not collections_enabled and ansible_os_family == 'RedHat' |
| 98 | + when: not collections_enabled|bool and ansible_os_family == 'RedHat' |
99 | 99 | tags: |
100 | 100 | - git |
101 | 101 | - base_git |
0 commit comments