main.yml 1001 Bytes
Newer Older
Pullyvan Krishnamoorthy's avatar
Pullyvan Krishnamoorthy committed
1
2
3
---
# tasks file for mathematica

4
5
6
7
8
9
10
11
12
13
14
- name: check that {{ mathematica_install_version }}.zip is not already downloaded
  stat:
    path: "/tmp/{{ mathematica_versions[mathematica_install_version]['url'] }}"
  register: mathematica_bundle

- name: download {{ mathematica_install_version }}.zip
  get_url:
    url: "{{ s3_base_url }}/{{ mathematica_versions[mathematica_install_version]['url'] }}"
    dest: "/tmp"
    timeout: 120
  when: mathematica_bundle.stat.exists == false
Pullyvan Krishnamoorthy's avatar
Pullyvan Krishnamoorthy committed
15
16
17
18

- name: Download {{ mathematica_install_version }}.zip & Unzip
  unarchive:
    dest: /tmp
19
    src: "/tmp/{{ mathematica_versions[mathematica_install_version]['url'] }}"
Pullyvan Krishnamoorthy's avatar
Pullyvan Krishnamoorthy committed
20
21
22
23
24
    remote_src: yes
    extra_opts:
      - -P
      - "{{ mathematica_versions[mathematica_install_version]['password'] }}"

25
26
27
28
- name: make mathematica installer executable
  file:
    path: "/tmp/{{ mathematica }}"
    mode: "+x"
Pullyvan Krishnamoorthy's avatar
Pullyvan Krishnamoorthy committed
29

30
- name: silently install mathematica
Pullyvan Krishnamoorthy's avatar
Pullyvan Krishnamoorthy committed
31
32
33
  become: yes
  command:
    cmd: "./{{ mathematica }} -- -silent"
34
    chdir: "/tmp"