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
40e96abb
Commit
40e96abb
authored
Sep 06, 2019
by
Reimar Stier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add conda install version check
parent
9fe99df8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
40 deletions
+54
-40
install.yml
local_roles/conda_installer/tasks/install.yml
+35
-0
main.yml
local_roles/conda_installer/tasks/main.yml
+19
-40
No files found.
local_roles/conda_installer/tasks/install.yml
0 → 100644
View file @
40e96abb
-
name
:
Install Conda
block
:
-
name
:
Download Miniconda
get_url
:
url
:
"
{{
conda_releases['latest']['download']
}}"
dest
:
/tmp/install-miniconda.sh
checksum
:
"
md5:{{
conda_releases['latest']['MD5']
}}"
mode
:
0550
-
name
:
Create conda folder
file
:
path
:
/opt/miniconda3
state
:
directory
owner
:
vagrant
mode
:
755
recurse
:
true
-
name
:
Run the installer
shell
:
/tmp/install-miniconda.sh -b -u -p /opt/miniconda3
-
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
-
name
:
conda - read permission for all
file
:
path
:
/opt/miniconda3
owner
:
mode
:
+r
recurse
:
true
-
name
:
conda - execution permission for all
file
:
path
:
/opt/miniconda3/bin
mode
:
+x
recurse
:
true
when
:
not check_conda.stat.exists
local_roles/conda_installer/tasks/main.yml
View file @
40e96abb
...
...
@@ -5,49 +5,28 @@
name
:
[
"
python-bs4"
,
"
python3-bs4"
]
state
:
present
-
name
:
Check Conda installation
stat
:
path
:
/opt/miniconda3
get_checksum
:
false
register
:
check_conda
-
name
:
Lookup recent version of conda
set_fact
:
conda_releases
:
"
{{
lookup('conda_releases',
conda_installer_distribution,
conda_installer_python_version)
}}"
-
name
:
Show conda releases
debug
:
msg="{{ conda_releases }}"
-
name
:
Install Conda
block
:
-
name
:
Download Miniconda
get_url
:
url
:
"
{{
conda_releases['latest']['download']
}}"
dest
:
/tmp/install-miniconda.sh
checksum
:
"
md5:{{
conda_releases['latest']['MD5']
}}"
mode
:
0550
-
name
:
Create conda folder
file
:
path
:
/opt/miniconda3
state
:
directory
owner
:
vagrant
mode
:
755
recurse
:
true
-
name
:
Run the installer
shell
:
/tmp/install-miniconda.sh -b -u -p /opt/miniconda3
-
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
-
name
:
conda - read permission for all
file
:
path
:
/opt/miniconda3
owner
:
mode
:
+r
recurse
:
true
-
name
:
conda - execution permission for all
file
:
path
:
/opt/miniconda3/bin
mode
:
+x
recurse
:
true
when
:
not check_conda.stat.exists
-
name
:
Select version
set_fact
:
conda_installer_version_info
:
"
{{
conda_releases[conda_installer_version]
}}"
-
name
:
Show selected version
debug
:
msg="{{ 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
}}"
-
name
:
Check Conda installation
stat
:
path
:
"
{{
conda_installer_path
}}"
get_checksum
:
false
register
:
check_conda
-
debug
:
msg="Conda exists {{ 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