Commit 10bbef5f authored by Pullyvan Krishnamoorthy's avatar Pullyvan Krishnamoorthy
Browse files

change zip to iso

parent 78c5233c
......@@ -2,8 +2,9 @@
# defaults file for mathematica
s3_base_url: https://s3.epfl.ch/10282-70726cc2c34fcfe7d4325ef7ea151411
mathematica_install_version: mathematica_12
mathematica_install_version: mathematica_13
tmp_mathematica: "/tmp/mathematica"
iso_mount: "/tmp/iso_mount"
mathematica_versions:
mathematica_12:
url: Mathematica_12.0.0_LINUX.zip
......@@ -17,8 +18,20 @@ mathematica_versions:
62623465373766663837323063613263626236336161666263303233343932356332343161353765
343564343164316232376630373766323361
mathematica_13:
url: Mathematica_13.0.0.sh
password: !vault |
$ANSIBLE_VAULT;1.1;AES256
39383535303635316238393139323762656564313533623935316335636164633330396563303162
3164376663653333316365353039366238356161633966660a386232616238353433393264653638
35353533663432613334383030653535366334626337633365343365323233306637303361373431
3636313864383331630a316335393461303833313337383834343266336462333861383433393365
33666237636465633265653635353162623037393165333031336566333338353232623864653236
62623465373766663837323063613263626236336161666263303233343932356332343161353765
343564343164316232376630373766323361
mathematica: Mathematica_12.0.0_LINUX.sh
mathematica: Mathematica_13.0.0.sh
aws_access_key: !vault |
$ANSIBLE_VAULT;1.1;AES256
......
---
# tasks file for mathematica
- name: install S3 requirements
- name: install S3 requirements and libraires
become: yes
yum:
state: latest
......@@ -8,47 +8,55 @@
- unzip
- python-boto.noarch
- python-boto3.noarch
- python2-botocore.noarch
- mesa-libGL
- fontconfig.x86_64
- fontconfig-devel.x86_64
- name: check that {{ mathematica_install_version }}.zip is not already downloaded
stat:
path: "/tmp/{{ mathematica_versions[mathematica_install_version]['url'] }}"
register: mathematica_bundle
- name: Create matlab folder
- name: Create mathematica folder
file:
path: "{{ tmp_mathematica }}"
state: directory
mode: "0755"
- name: Download {{ mathematica_install_version }}.zip
- name: Download {{ mathematica_install_version }}
amazon.aws.aws_s3:
access_key: "{{ aws_access_key }}"
secret_key: "{{ aws_secret_key }}"
bucket: 10282-70726cc2c34fcfe7d4325ef7ea151411
object: "/{{ mathematica_versions[mathematica_install_version]['url'] }}"
object: "/mathematica/{{ mathematica_versions[mathematica_install_version]['url'] }}"
dest: "{{ tmp_mathematica }}/{{ mathematica_versions[mathematica_install_version]['url'] }}"
mode: get
s3_url: https://s3.epfl.ch/
validate_certs: no
when: mathematica_bundle.stat.exists == false
- name: Unzip {{ mathematica_install_version }}.zip
unarchive:
dest: /tmp
src: "{{ tmp_mathematica }}/{{ mathematica_versions[mathematica_install_version]['url'] }}"
remote_src: yes
extra_opts:
- -P
- "{{ mathematica_versions[mathematica_install_version]['password'] }}"
- name: "Check mathematica {{ iso_mount }} folder exists"
become: yes
stat:
path: "{{ tmp_mathematica }}"
register: mathematica_tmp
- name: Create mathematica tmp folder for iso mount
file:
path: "{{ tmp_mathematica }}"
state: directory
mode: "0755"
when: mathematica_tmp.stat.exists == False
- name: make mathematica installer executable
file:
path: "/tmp/{{ mathematica }}"
path: "{{ tmp_mathematica }}/{{ mathematica }}"
mode: "+x"
- name: silently install mathematica
become: yes
command:
cmd: "./{{ mathematica }} -- -silent"
chdir: "/tmp"
chdir: "{{ tmp_mathematica }}"
---
# tasks file for mathematica
- include: debian.yml tags=debian
when: ansible_os_family == 'Debian'
- include: ubuntu.yml tags=debian
when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "18"
- include: ubuntu.yml tags=debian
when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "20"
- include: centos.yml tags=centos
when: ansible_distribution == "CentOS"
\ No newline at end of file
when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7"
---
# tasks file for mathematica
- name: install S3 requirements
- name: install S3 requirements and libraries
become: yes
apt:
state: latest
......@@ -8,6 +8,12 @@
- python3-boto
- python3-boto3
- python3-botocore
- libgl1-mesa-glx
- libfontconfig1
- fontconfig
- libfontconfig1-dev
- alsa-lib.x86_64
- name: check that {{ mathematica_install_version }}.zip is not already downloaded
......@@ -15,41 +21,47 @@
path: "{{ tmp_mathematica }}/{{ mathematica_versions[mathematica_install_version]['url'] }}"
register: mathematica_bundle
- name: Create matlab folder
- name: Create mathematica folder
file:
path: "{{ tmp_mathematica }}"
state: directory
mode: "0755"
- name: Download {{ mathematica_install_version }}.zip
- name: Download {{ mathematica_install_version }}
amazon.aws.aws_s3:
access_key: "{{ aws_access_key }}"
secret_key: "{{ aws_secret_key }}"
bucket: 10282-70726cc2c34fcfe7d4325ef7ea151411
object: "/{{ mathematica_versions[mathematica_install_version]['url'] }}"
object: "/mathematica/{{ mathematica_versions[mathematica_install_version]['url'] }}"
dest: "{{ tmp_mathematica }}/{{ mathematica_versions[mathematica_install_version]['url'] }}"
mode: get
s3_url: https://s3.epfl.ch/
validate_certs: no
when: mathematica_bundle.stat.exists == false
- name: Unzip {{ mathematica_install_version }}.zip
unarchive:
dest: /tmp
src: "{{ tmp_mathematica }}/{{ mathematica_versions[mathematica_install_version]['url'] }}"
remote_src: yes
extra_opts:
- -P
- "{{ mathematica_versions[mathematica_install_version]['password'] }}"
- name: "Check mathematica {{ tmp_mathematica }} folder exists"
become: yes
stat:
path: "{{ tmp_mathematica }}"
register: mathematica_tmp
- name: Create mathematica tmp folder
file:
path: "{{ tmp_mathematica }}"
state: directory
mode: "0755"
when: mathematica_tmp.stat.exists == False
- name: make mathematica installer executable
file:
path: "/tmp/{{ mathematica }}"
path: "{{ tmp_mathematica }}/{{ mathematica }}"
mode: "+x"
- name: silently install mathematica
become: yes
command:
cmd: "./{{ mathematica }} -- -silent"
chdir: "/tmp"
chdir: "{{ tmp_mathematica }}"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment