|
7 | 7 | fail: |
8 | 8 | msg: >- |
9 | 9 | This role supports only on x86_64 architecture. |
10 | | - You are running on {{ ansible_architecture }} architecture. |
| 10 | + You are running on {{ ansible_facts['architecture'] }} architecture. |
11 | 11 | Let us know if you need the role to support it. |
12 | | - when: ansible_architecture != 'x86_64' |
| 12 | + when: ansible_facts['architecture'] != 'x86_64' |
13 | 13 |
|
14 | 14 | - name: Fail if role installs openmpi without cuda toolkit |
15 | 15 | fail: |
|
61 | 61 |
|
62 | 62 | - name: Ensure that the non-EUS RHUI Azure repository is not installed |
63 | 63 | package: |
64 | | - name: rhui-azure-rhel{{ ansible_distribution_major_version }} |
| 64 | + name: rhui-azure-rhel{{ ansible_facts['distribution_major_version'] }} |
65 | 65 | state: absent |
66 | 66 | use: "{{ (__hpc_server_is_ostree | d(false)) | |
67 | 67 | ternary('ansible.posix.rhel_rpm_ostree', omit) }}" |
68 | 68 |
|
69 | 69 | - name: Enable the RHUI Azure EUS repository |
70 | 70 | when: >- |
71 | | - 'rhui-microsoft-azure-rhel' + ansible_distribution_major_version |
| 71 | + 'rhui-microsoft-azure-rhel' + ansible_facts['distribution_major_version'] |
72 | 72 | + '-eus ' not in __hpc_dnf_repolist.stdout |
73 | 73 | block: |
74 | 74 | - name: Create a temp file for the EUS repository configuration |
75 | 75 | tempfile: |
76 | 76 | state: file |
77 | | - prefix: rhel{{ ansible_distribution_major_version }}-eus |
| 77 | + prefix: rhel{{ ansible_facts['distribution_major_version'] }}-eus |
78 | 78 | suffix: .config |
79 | 79 | register: __hpc_euc_config |
80 | 80 |
|
|
89 | 89 | - name: Add EUS repository |
90 | 90 | command: >- |
91 | 91 | dnf --config {{ __hpc_euc_config.path }} install |
92 | | - rhui-azure-rhel{{ ansible_distribution_major_version }}-eus |
| 92 | + rhui-azure-rhel{{ ansible_facts['distribution_major_version'] }}-eus |
93 | 93 | --assumeyes |
94 | 94 | changed_when: true |
95 | 95 |
|
96 | 96 | - name: Lock the RHEL minor release to the current minor release |
97 | 97 | copy: |
98 | | - content: "{{ ansible_distribution_version }}" |
| 98 | + content: "{{ ansible_facts['distribution_version'] }}" |
99 | 99 | dest: /etc/dnf/vars/releasever |
100 | 100 | mode: "0644" |
101 | 101 | owner: root |
|
225 | 225 | - name: Install NVidia driver |
226 | 226 | # Note that currently the role supports only Microsoft Azure |
227 | 227 | # When we add more cloud providers, we need to update this condition |
228 | | - when: ansible_system_vendor == "Microsoft Corporation" |
| 228 | + when: ansible_facts["system_vendor"] == "Microsoft Corporation" |
229 | 229 | block: |
230 | 230 | - name: Get list of dnf modules |
231 | 231 | command: dnf module list |
|
274 | 274 |
|
275 | 275 | - name: Install CUDA driver and enable nvidia-persistenced.service |
276 | 276 | when: |
277 | | - - ansible_system_vendor == "Microsoft Corporation" |
| 277 | + - ansible_facts["system_vendor"] == "Microsoft Corporation" |
278 | 278 | - hpc_install_cuda_driver |
279 | 279 | block: |
280 | 280 | - name: Install CUDA driver |
|
294 | 294 | - name: Install CUDA Toolkit and lock version of its packages |
295 | 295 | when: |
296 | 296 | - hpc_install_cuda_toolkit |
297 | | - - ansible_system_vendor == "Microsoft Corporation" |
| 297 | + - ansible_facts["system_vendor"] == "Microsoft Corporation" |
298 | 298 | block: |
299 | 299 | - name: Install CUDA Toolkit |
300 | 300 | package: |
|
449 | 449 | ./configure --prefix={{ __hpc_pmix_path }} |
450 | 450 | --enable-pmix-binaries |
451 | 451 | --disable-dependency-tracking |
452 | | - - make -j {{ ansible_processor_nproc }} |
| 452 | + - make -j {{ ansible_facts["processor_nproc"] }} |
453 | 453 | - make install |
454 | 454 |
|
455 | 455 | - name: Ensure PMIx modulefile directory exists |
|
638 | 638 | --enable-prte-prefix-by-default |
639 | 639 | --with-platform=contrib/platform/mellanox/optimized |
640 | 640 | --with-cuda={{ __hpc_cuda_path }} |
641 | | - - make -j {{ ansible_processor_nproc }} |
| 641 | + - make -j {{ ansible_facts["processor_nproc"] }} |
642 | 642 | - make install |
643 | 643 |
|
644 | 644 | - name: Remove extracted tarball |
|
0 commit comments