Commit 78c5233c authored by Emmanuel Jaep's avatar Emmanuel Jaep
Browse files

Merge branch 'AddCentOSSupportForMathematica2' into 'master'

Add cent os support for mathematica2

See merge request !4
parents e83d60e2 ca2960db
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
s3_base_url: https://s3.epfl.ch/10282-70726cc2c34fcfe7d4325ef7ea151411 s3_base_url: https://s3.epfl.ch/10282-70726cc2c34fcfe7d4325ef7ea151411
mathematica_install_version: mathematica_12 mathematica_install_version: mathematica_12
tmp_mathematica: "/tmp/mathematica"
mathematica_versions: mathematica_versions:
mathematica_12: mathematica_12:
url: Mathematica_12.0.0_LINUX.zip url: Mathematica_12.0.0_LINUX.zip
......
---
# tasks file for mathematica
- name: install S3 requirements
become: yes
yum:
state: latest
pkg:
- unzip
- python-boto.noarch
- python-boto3.noarch
- python2-botocore.noarch
- 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
file:
path: "{{ tmp_mathematica }}"
state: directory
mode: "0755"
- name: Download {{ mathematica_install_version }}.zip
amazon.aws.aws_s3:
access_key: "{{ aws_access_key }}"
secret_key: "{{ aws_secret_key }}"
bucket: 10282-70726cc2c34fcfe7d4325ef7ea151411
object: "/{{ 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: make mathematica installer executable
file:
path: "/tmp/{{ mathematica }}"
mode: "+x"
- name: silently install mathematica
become: yes
command:
cmd: "./{{ mathematica }} -- -silent"
chdir: "/tmp"
---
# tasks file for mathematica
- name: install S3 requirements
become: yes
apt:
state: latest
pkg:
- python3-boto
- python3-boto3
- python3-botocore
- name: check that {{ mathematica_install_version }}.zip is not already downloaded
stat:
path: "{{ tmp_mathematica }}/{{ mathematica_versions[mathematica_install_version]['url'] }}"
register: mathematica_bundle
- name: Create matlab folder
file:
path: "{{ tmp_mathematica }}"
state: directory
mode: "0755"
- name: Download {{ mathematica_install_version }}.zip
amazon.aws.aws_s3:
access_key: "{{ aws_access_key }}"
secret_key: "{{ aws_secret_key }}"
bucket: 10282-70726cc2c34fcfe7d4325ef7ea151411
object: "/{{ 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: make mathematica installer executable
file:
path: "/tmp/{{ mathematica }}"
mode: "+x"
- name: silently install mathematica
become: yes
command:
cmd: "./{{ mathematica }} -- -silent"
chdir: "/tmp"
--- ---
# tasks file for mathematica # tasks file for mathematica
- name: install S3 requirements - include: debian.yml tags=debian
become: yes when: ansible_os_family == 'Debian'
apt:
state: latest
pkg:
- python3-boto
- python3-boto3
- python3-botocore
- python-boto
- python-boto3
- python-botocore
- name: check that {{ mathematica_install_version }}.zip is not already downloaded - include: centos.yml tags=centos
stat: when: ansible_distribution == "CentOS"
path: "/tmp/{{ mathematica_versions[mathematica_install_version]['url'] }}" \ No newline at end of file
register: mathematica_bundle
- name: Download {{ comsol_install_version }}.zip
amazon.aws.aws_s3:
access_key: "{{ aws_access_key }}"
secret_key: "{{ aws_secret_key }}"
bucket: 10282-70726cc2c34fcfe7d4325ef7ea151411
object: "/{{ mathematica_versions[mathematica_install_version]['url'] }}"
dest: "/tmp/"
mode: get
s3_url: https://s3.epfl.ch/
validate_certs: no
when: mathematica_bundle.stat.exists == false
- name: Download {{ mathematica_install_version }}.zip & Unzip
unarchive:
dest: /tmp
src: "/tmp/{{ mathematica_versions[mathematica_install_version]['url'] }}"
remote_src: yes
extra_opts:
- -P
- "{{ mathematica_versions[mathematica_install_version]['password'] }}"
- name: make mathematica installer executable
file:
path: "/tmp/{{ mathematica }}"
mode: "+x"
- name: silently install mathematica
become: yes
command:
cmd: "./{{ mathematica }} -- -silent"
chdir: "/tmp"
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