Skip to content
Snippets Groups Projects
Commit c36acdd7 authored by Dirk Sarpe's avatar Dirk Sarpe
Browse files

initial commit to install julia on ubuntu

parents
Branches
No related tags found
No related merge requests found
LICENSE 0 → 100644
Copyright 2019 Dirk Sarpe
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Julia
=========
Installs Julia on Ubuntu
Table of Contents
-----------------
<!-- toc -->
<!-- tocstop -->
Requirements
------------
Role Variables
--------------
Dependencies
------------
Example Playbook
----------------
Add to `requirements.yml`:
```yml
---
-src: role.name
...
```
Download:
```console
$ ansible-galaxy install -r requirements.yml
```
### Top-Level Playbook
Write a top-level playbook:
```yml
---
- name: idiv-playbook
hosts: idiv-machines
roles:
- role: ansible-role-julia
tags:
- idiv
...
```
### Role Dependency
Define the role dependency in `meta/main.yml`:
```yml
---
dependencies:
- role: role.name
tags:
- idiv
...
```
License
-------
MIT
Author Information
------------------
This role was created in 2018 by [Dirk Sarpe][author] aka [dirks at GitHub][github], administrator at the [German Centre for Integrative Biodiversity Research (iDiv)][idiv].
[author]: https://www.idiv.de/groups_and_people/employees/details/eshow/sarpe-dirk.html
[idiv]: https://www.idiv.de/
[github]: https://github.com/dirks
---
# defaults file for ansible-role-idiv-template
# filename on server julia-1.0.3-linux-x86_64.tar.gz
julia_version: 1.0.3
julia_installation_dir: '/usr/local'
galaxy_info:
author: Dirk Sarpe
description: installs the programming language julia
company: iDiv
license: MIT
min_ansible_version: 2.7
# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:
# Optionally specify the branch Galaxy will use when accessing the GitHub
# repo for this role. During role install, if no tags are available,
# Galaxy will use this branch. During import Galaxy will access files on
# this branch. If Travis integration is configured, only notifications for this
# branch will be accepted. Otherwise, in all cases, the repo's default branch
# (usually master) will be used.
#github_branch:
#
# platforms is a list of platforms, and each platform has a name and a list of versions.
#
platforms:
- name: ubuntu
versions:
- xenial
- bionic
galaxy_tags:
- idiv
- julia
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.
dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
---
# tasks file for ansible-role-idiv-template
- name: ensure download directory exists
file:
path: '{{ julia_download_dir }}'
state: directory
owner: root
group: root
mode: 0755
- name: download sha of julia archive
get_url:
url: '{{ julia_checksum_url }}'
dest: '{{ julia_download_dir }}'
- name: extract checksum
command: >-
awk '$2 == "{{ julia_tarball }}" { print $1 }' {{ julia_download_dir }}/{{ julia_checksum_file }}
register: julia_checksum
changed_when: no
- name: download specified version of Julia
get_url:
url: https://julialang-s3.julialang.org/bin/linux/x64/1.0/julia-1.0.3-linux-x86_64.tar.gz
dest: '{{ julia_download_dir }}'
checksum: 'sha256:{{ julia_checksum.stdout_lines[0] }}'
- name: install Julia
unarchive:
src: '{{ julia_download_dir }}/{{ julia_tarball }}'
dest: '{{ julia_installation_dir }}'
exclude: LICENSE.md
extra_opts:
- --strip-components=1
remote_src: yes
owner: root
group: root
---
# vars file for ansible-role-idiv-template---
julia_checksum_file: julia-{{ julia_version }}.sha256
julia_checksum_url: https://julialang-s3.julialang.org/bin/checksums/{{ julia_checksum_file }}
julia_tarball: julia-{{ julia_version}}-linux-x86_64.tar.gz
julia_download_url: https://julialang-s3.julialang.org/bin/linux/x64/1.0/{{ julia_tarball }}
julia_download_dir: '/var/cache/julia-dl'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment