From a7b3a7f02de7fcbefdf9804eb10384c272c96f27 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Fri, 30 Sep 2022 13:17:38 +0000 Subject: [PATCH] Add MATLAB WIP - license activation does not work currently. --- roles/winroom/tasks/matlab.yml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/roles/winroom/tasks/matlab.yml b/roles/winroom/tasks/matlab.yml index 4640904..37b0734 100644 --- a/roles/winroom/tasks/matlab.yml +++ b/roles/winroom/tasks/matlab.yml @@ -1 +1,26 @@ -# TODO +- name: Set Matlab version + set_fact: + target_version: "r2022b" + +- name: Mount Matlab ISO + win_disk_image: + image_path: "{{ installers }}\\matlab\\matlab-{{ target_version }}.iso" + state: present + register: disk_image + +- name: Install Matlab + win_package: + path: "{{ disk_image.mount_paths[0] }}\\setup.exe" + arguments: -inputFile "{{ installers }}\\matlab\\installer_input.txt" + +- name: Unmount Matlab ISO + win_disk_image: + image_path: "{{ installers }}\\matlab\\matlab-{{ target_version }}.iso" + state: absent + +# TODO MATLAB throws license error -83 when run +- name: Install Matlab license + win_copy: + dest: "%ProgramFiles%\\MATLAB\\{{ target_version }}\\licenses\\network.lic" + src: "{{ installers }}\\matlab\\network.lic" + remote_src: yes