Skip to content

Instantly share code, notes, and snippets.

@danibyay
Last active January 17, 2023 19:05
Show Gist options
  • Save danibyay/1cebaa3d1a194be7c99ccfccdeb65300 to your computer and use it in GitHub Desktop.
Save danibyay/1cebaa3d1a194be7c99ccfccdeb65300 to your computer and use it in GitHub Desktop.
Part of a windows ansible role
- name: Create C:\TEMP directory
win_file: path='C:\TEMP' state=directory
- name: Download OneApi2021.4
ansible.windows.win_powershell:
script: |
az storage file download --account-name xxxxxxx --account-key {{ key }} --share-name ansible-files --path "w_BaseKit_p_2021.4.0.3421_offline.exe" --dest "C:\TEMP\w_BaseKit_p_2021.4.0.3421_offline.exe" --output none
- name: Add compatibility mode registry setting
ansible.windows.win_regedit:
path: HKCU:\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
name: C:\TEMP\w_BaseKit_p_2021.4.0.3421_offline.exe
data: 'WIN8RTM'
- name: Install Intel OneApi 2021.4
win_package:
path: C:\TEMP\w_BaseKit_p_2021.4.0.3421_offline.exe
arguments:
- -s
- -a
- --silent
- --eula
- accept
- -p=NEED_VS2017_INTEGRATION=0
- -p=NEED_VS2019_INTEGRATION=0
- -p=NEED_VS2022_INTEGRATION=0
creates_path: 'C:\Program Files (x86)\Intel\oneAPI'
state: present
- name: Add INTEL_FORTRAN_PATH env var
ansible.windows.win_environment:
state: present
name: INTEL_FORTRAN_PATH
value: C:\Program Files (x86)\Intel\oneAPI\compiler\2022.2.0\windows
level: machine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment