2023-10-25 19:41:00 +00:00
|
|
|
- name: Set Matlab version and destination
|
2023-09-11 20:30:48 +00:00
|
|
|
set_fact:
|
2023-10-25 19:41:00 +00:00
|
|
|
target_version: "r2023b"
|
|
|
|
license_path: \\ucilnicesmb.fri1.uni-lj.si\ucilnice_d\install\matlab\network.lic
|
|
|
|
dest_dir: D:\matlab
|
2023-09-11 20:30:48 +00:00
|
|
|
|
|
|
|
- name: Mount Matlab ISO
|
|
|
|
win_disk_image:
|
2023-10-25 19:41:00 +00:00
|
|
|
image_path: "{{ installers }}\\matlab\\matlab-{{ target_version }}_windows.iso"
|
2023-09-11 20:30:48 +00:00
|
|
|
state: present
|
|
|
|
register: disk_image
|
|
|
|
|
2023-10-25 19:41:00 +00:00
|
|
|
- name: Prepare installer_input.txt
|
|
|
|
template:
|
|
|
|
src: installer_input.txt
|
|
|
|
dest: d:\matlab_installer_input.txt
|
|
|
|
|
2023-09-11 20:30:48 +00:00
|
|
|
- name: Install Matlab
|
|
|
|
win_package:
|
|
|
|
path: "{{ disk_image.mount_paths[0] }}\\setup.exe"
|
2023-10-25 19:41:00 +00:00
|
|
|
arguments: -inputFile "d:\\matlab_installer_input.txt"
|
2023-09-11 20:30:48 +00:00
|
|
|
|
|
|
|
- name: Unmount Matlab ISO
|
|
|
|
win_disk_image:
|
2023-10-25 19:41:00 +00:00
|
|
|
image_path: "{{ installers }}\\matlab\\matlab-{{ target_version }}_windows.iso"
|
2023-09-11 20:30:48 +00:00
|
|
|
state: absent
|
|
|
|
|
|
|
|
# TODO MATLAB throws license error -83 when run
|
|
|
|
- name: Install Matlab license
|
|
|
|
win_copy:
|
2023-10-25 19:41:00 +00:00
|
|
|
dest: "{{ dest_dir }}\\licenses\\network.lic"
|
2023-09-11 20:30:48 +00:00
|
|
|
src: "{{ installers }}\\matlab\\network.lic"
|
|
|
|
remote_src: yes
|