Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vagrantsetup
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
devbox
vagrantsetup
Commits
3147616f
Commit
3147616f
authored
Sep 06, 2019
by
Reimar Stier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conda installer update logic
parent
40e96abb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
13 deletions
+27
-13
.gitignore
.gitignore
+1
-0
main.yml
local_roles/conda_installer/defaults/main.yml
+2
-1
install.yml
local_roles/conda_installer/tasks/install.yml
+18
-7
main.yml
local_roles/conda_installer/tasks/main.yml
+6
-5
No files found.
.gitignore
View file @
3147616f
...
...
@@ -3,3 +3,4 @@
.idea/
roles/
disks
*.pyc
local_roles/conda_installer/defaults/main.yml
View file @
3147616f
...
...
@@ -4,4 +4,5 @@ conda_installer_version: "latest"
# distribution may be either miniconda or anaconda
conda_installer_distribution
:
"
miniconda"
conda_installer_python_version
:
"
3"
conda_installer_dir
:
"
/opt"
conda_installer_parent_dir
:
"
/opt"
conda_installer_dir
:
"
{{
conda_installer_parent_dir
}}/conda"
\ No newline at end of file
local_roles/conda_installer/tasks/install.yml
View file @
3147616f
...
...
@@ -2,34 +2,45 @@
block
:
-
name
:
Download Miniconda
get_url
:
url
:
"
{{
conda_
releases['latest']
['download']
}}"
url
:
"
{{
conda_
installer_version_info
['download']
}}"
dest
:
/tmp/install-miniconda.sh
checksum
:
"
md5:{{
conda_
releases['latest']
['MD5']
}}"
checksum
:
"
md5:{{
conda_
installer_version_info
['MD5']
}}"
mode
:
0550
-
name
:
Create conda folder
file
:
path
:
/opt/miniconda3
path
:
"
{{
conda_installer_path
}}"
state
:
directory
owner
:
vagrant
mode
:
755
recurse
:
true
-
name
:
Run the installer
shell
:
/tmp/install-miniconda.sh -b -u -p /opt/miniconda3
# https://docs.anaconda.com/anaconda/install/silent-mode
shell
:
"
/tmp/install-miniconda.sh
-b
-u
-p
{{
conda_installer_path
}}"
-
name
:
Remove the installer
file
:
state
:
absent
path
:
/tmp/install-miniconda.sh
-
name
:
Add miniconda bin to path
shell
:
echo 'export PATH=/opt/miniconda3/bin:$PATH' >> /etc/profile
lineinfile
:
path
:
/etc/profile
regexp
:
'
^export
PATH={{
conda_installer_dir
}}/bin:\$PATH$'
line
:
"
export
PATH={{
conda_installer_dir
}}/bin:$PATH"
-
name
:
conda - read permission for all
file
:
path
:
/opt/miniconda3
path
:
"
{{
conda_installer_path
}}"
owner
:
mode
:
+r
recurse
:
true
-
name
:
conda - execution permission for all
file
:
path
:
/opt/miniconda3/bin
path
:
"
{{
conda_installer_path
}}/bin"
mode
:
+x
recurse
:
true
-
name
:
conda - create symlink for base directory
file
:
src
:
"
{{
conda_installer_path
}}"
dest
:
"
{{
conda_installer_dir
}}"
state
:
link
when
:
not check_conda.stat.exists
local_roles/conda_installer/tasks/main.yml
View file @
3147616f
...
...
@@ -13,14 +13,15 @@
-
name
:
Select version
set_fact
:
conda_installer_version_info
:
"
{{
conda_releases[conda_installer_version]
}}"
conda_installer_version_info
:
"
{{
conda_releases[conda_installer_version]
|
default()
}}"
-
name
:
Show selected version
-
name
:
"
Show
selected
version,
fails
if
version
{{
conda_installer_version
}}
was
not
found"
debug
:
msg="{{ conda_installer_version_info }}"
failed_when
:
not conda_installer_version_info
-
name
:
Define installation directory path with version
set_fact
:
conda_installer_path
:
"
{{
conda_installer_
dir
}}/{{
conda_installer_distribution
}}{{
conda_installer_python_version
}}"
conda_installer_path
:
"
{{
conda_installer_
parent_dir
}}/{{
conda_installer_distribution
}}{{
conda_installer_python_version
}}_{{
conda_installer_version_info['version']
}}"
-
name
:
Check Conda installation
stat
:
...
...
@@ -28,5 +29,5 @@
get_checksum
:
false
register
:
check_conda
-
debug
:
msg="Conda exists {{ check_conda.stat.exists }}"
#- import_tasks: install.yml
\ No newline at end of file
-
debug
:
msg="Conda exists in {{ conda_installer_path }} is {{ check_conda.stat.exists }}"
-
import_tasks
:
install.yml
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment