From 3950db2e08a1b3611792e02e58b6d005cf31578f Mon Sep 17 00:00:00 2001 From: Krish M Date: Mon, 18 Jul 2022 11:21:37 -0500 Subject: [PATCH] Install matlab as a dummy app Run xfce-desktop on launch and run command -matlab --- roles/ohpc_matlab/tasks/main.yaml | 28 ++++++++++++---------------- roles/ohpc_matlab/templates/matlab | 3 +++ 2 files changed, 15 insertions(+), 16 deletions(-) create mode 100644 roles/ohpc_matlab/templates/matlab diff --git a/roles/ohpc_matlab/tasks/main.yaml b/roles/ohpc_matlab/tasks/main.yaml index 296ed1c4..c76677b9 100644 --- a/roles/ohpc_matlab/tasks/main.yaml +++ b/roles/ohpc_matlab/tasks/main.yaml @@ -1,26 +1,22 @@ -- name: install the latest version of libXtst - yum: - name: libXt - state: latest - -- name: Create directory +- name: Create matlab directory file: path: "{{ matlab_clustershare }}" state: directory mode: 0755 -- name: Download matlab - get_url: - url: "{{ matlab_download_url }}" - dest: "{{ matlab_destination }}" +- name: Create directoryi for matlab bin + file: + path: "{{ matlab_clustershare }}/{{ matlab_module_file }}/bin" + state: directory + mode: 0755 -- name: Extract matlab - unarchive: - src: "{{ matlab_destination }}" - dest: "{{ matlab_clustershare }}" - remote_src: yes +- name: Install MATLAB (Executable file to run xfce4desktop) + template: + src: "{{ matlab_module_appdir }}" + dest: "{{ matlab_clustershare }}/{{ matlab_module_file }}/bin/{{ matlab_module_appdir }}" + mode: a+x -- name: Create directory +- name: Create modules directory file: path: "{{ matlab_module_path }}/{{ matlab_module_appdir }}" state: directory diff --git a/roles/ohpc_matlab/templates/matlab b/roles/ohpc_matlab/templates/matlab new file mode 100644 index 00000000..7ec7d9b3 --- /dev/null +++ b/roles/ohpc_matlab/templates/matlab @@ -0,0 +1,3 @@ +#!/bin/bash + +xfce4-terminal