Commit b3dbde95 authored by Pullyvan Krishnamoorthy's avatar Pullyvan Krishnamoorthy
Browse files

add Centos 7, Ubuntu 18.04 and Ubuntu 20.04 selection checked in main.yml playbook

parents
---
language: python
python: "2.7"
# Use the new container infrastructure
sudo: false
# Install ansible
addons:
apt:
packages:
- python-pip
install:
# Install ansible
- pip install ansible
# Check ansible version
- ansible --version
# Create ansible.cfg with correct roles_path
- printf '[defaults]\nroles_path=../' >ansible.cfg
script:
# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
\ No newline at end of file
# Role Mathematica
Ansible role to install silently Mathematica 12 without licenses. Other versions will come later
Compatibility
------------
This role can be used on all Linux OS
Variables Used
------------
You can find in defaults/main.yml all variables used in tasks
| Variable | Default Value | Type | Description |
| -------------- | :-------------------------- | :----- | ---------------------------------- |
| mathematica_sh | Mathematica_12.0.0_LINUX.sh | String | Mathematica installer |
| dest_folder | /tmp | String | Path where the installer is stored |
## Activating license
To activate the license, you must to connect via ssh via your export display like:
```bash
ssh username@serverhostname -X
```
Then you'll have to start mathematica by using this command:
```bash
mathematica
```
In the opened windows, you'll have to fill with your informations & activation key.
### Get an activation key
You have to connect on go.epfl.ch/wolfram. Then connect with your gaspar account. You'll be able then to activate an activation key on your user portal
## Author Information
Written by [Dimitri Colier](mailto:dimitri.colier@epfl.ch) for EPFL - STI school of engineering
\ No newline at end of file
---
# defaults file for mathematica
s3_base_url: https://s3.epfl.ch/10282-70726cc2c34fcfe7d4325ef7ea151411
mathematica_install_version: mathematica_12
tmp_mathematica: "/tmp/mathematica"
mathematica_versions:
mathematica_12:
url: Mathematica_12.0.0_LINUX.zip
password: !vault |
$ANSIBLE_VAULT;1.1;AES256
39383535303635316238393139323762656564313533623935316335636164633330396563303162
3164376663653333316365353039366238356161633966660a386232616238353433393264653638
35353533663432613334383030653535366334626337633365343365323233306637303361373431
3636313864383331630a316335393461303833313337383834343266336462333861383433393365
33666237636465633265653635353162623037393165333031336566333338353232623864653236
62623465373766663837323063613263626236336161666263303233343932356332343161353765
343564343164316232376630373766323361
mathematica: Mathematica_12.0.0_LINUX.sh
aws_access_key: !vault |
$ANSIBLE_VAULT;1.1;AES256
61653863313239353563376165396363303837326136376336363164313861346265666165633264
3866613631376466323065623537356461643135666531640a643933373139623637373234633864
63346235373732373034633261633465353931663630353936396230323863323964343762323762
3233313132306666350a373439363938366362663634323039393966336464306565353066393362
36643262316139393531616335326439643566666135306466386231343762336135
aws_secret_key: !vault |
$ANSIBLE_VAULT;1.1;AES256
63333833383837636135663937313738353364323635366162323366663633666264396161666165
3435313865363630376261313638646366396466633662650a383239666665333938663136353834
33653735386665333938373332343865343235623266616538633366323837383530633364623736
3063656234356462380a366638626665313933626462623432356238616363393636333862633964
66366338336561366235666561333133653337366637333835383063323765353732313665343334
3162363761623835393664613230376164653263386165393162
\ No newline at end of file
---
# handlers file for mathematica
\ No newline at end of file
install_date: Wed Jan 19 12:47:17 2022
version: ''
---
galaxy_info:
author: Dimitri Colier
description: Install Mathematica 12 on ubuntu
company: EPFL
issue_tracker_url: https://support.epfl.ch
min_ansible_version: 2.9
platforms:
- name: Ubuntu
versions:
- bionic
galaxy_tags:
- Mathematica
- linux
dependencies: []
---
# 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
- include: ubuntu18.yml tags=debian
when: ansible_distribution_major_version == "18"
- include: ubuntu20.yml tags=debian
when: ansible_distribution_major_version == "20"
- include: centos7.yml tags=centos
when: ansible_distribution_major_version == "7"
---
# 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
- 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"
sti-cluster-node-01.vagrant ansible_host=192.168.50.10
---
- hosts: all
remote_user: root
roles:
- ../../mathematica
\ No newline at end of file
---
# vars file for mathematica
\ No newline at end of file
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