Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ansible-role-julia
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dirk Sarpe
ansible-role-julia
Commits
79bde7d5
Commit
79bde7d5
authored
6 years ago
by
Dirk Sarpe
Browse files
Options
Downloads
Patches
Plain Diff
make julia version configurable
parent
c36acdd7
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
defaults/main.yml
+2
-1
2 additions, 1 deletion
defaults/main.yml
tasks/main.yml
+22
-1
22 additions, 1 deletion
tasks/main.yml
vars/main.yml
+1
-1
1 addition, 1 deletion
vars/main.yml
with
25 additions
and
3 deletions
defaults/main.yml
+
2
−
1
View file @
79bde7d5
---
# 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_install
:
no
julia_version
:
'
latest'
julia_installation_dir
:
'
/usr/local'
This diff is collapsed.
Click to expand it.
tasks/main.yml
+
22
−
1
View file @
79bde7d5
...
...
@@ -8,6 +8,27 @@
group
:
root
mode
:
0755
-
name
:
get latest julia release info from github
uri
:
url
:
'
https://api.github.com/repos/JuliaLang/julia/releases/latest'
return_content
:
yes
register
:
julia_github_response
when
:
julia_version == 'latest'
-
name
:
exract latest julia release from variable
set_fact
:
julia_version
:
"
{{
julia_github_response.json.tag_name
|
replace('v',
'')
}}"
when
:
julia_version == 'latest'
-
name
:
exract minor julia release from release variable
set_fact
:
julia_version_minor
:
"
{{
julia_version
|
regex_replace('^(
\\
d+
\\
.
\\
d+)
\\
.
\\
d+.*$',
'
\\
1')
}}"
-
name
:
if checkmode show julia_version
debug
:
var
:
julia_version_minor
when
:
ansible_check_mode or ansible_diff_mode
-
name
:
download sha of julia archive
get_url
:
url
:
'
{{
julia_checksum_url
}}'
...
...
@@ -21,7 +42,7 @@
-
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
url
:
'
https://julialang-s3.julialang.org/bin/linux/x64/
{{
julia_version_minor
}}/julia-{{
julia_version
}}
-linux-x86_64.tar.gz
'
dest
:
'
{{
julia_download_dir
}}'
checksum
:
'
sha256:{{
julia_checksum.stdout_lines[0]
}}'
...
...
This diff is collapsed.
Click to expand it.
vars/main.yml
+
1
−
1
View file @
79bde7d5
...
...
@@ -3,5 +3,5 @@
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_url
:
'
https://julialang-s3.julialang.org/bin/linux/x64/
{{
julia_version_minor
}}
/{{
julia_tarball
}}
'
julia_download_dir
:
'
/var/cache/julia-dl'
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment