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 @@
...
@@ -5,49 +5,28 @@
name
:
[
"
python-bs4"
,
"
python3-bs4"
]
name
:
[
"
python-bs4"
,
"
python3-bs4"
]
state
:
present
state
:
present
-
name
:
Check Conda installation
stat
:
path
:
/opt/miniconda3
get_checksum
:
false
register
:
check_conda
-
name
:
Lookup recent version of conda
-
name
:
Lookup recent version of conda
set_fact
:
set_fact
:
conda_releases
:
"
{{
lookup('conda_releases',
conda_installer_distribution,
conda_installer_python_version)
}}"
conda_releases
:
"
{{
lookup('conda_releases',
conda_installer_distribution,
conda_installer_python_version)
}}"
-
name
:
Show conda releases
-
name
:
Show conda releases
debug
:
msg="{{ conda_releases }}"
debug
:
msg="{{ conda_releases }}"
-
name
:
Install Conda
-
name
:
Select version
block
:
set_fact
:
-
name
:
Download Miniconda
conda_installer_version_info
:
"
{{
conda_releases[conda_installer_version]
}}"
get_url
:
url
:
"
{{
conda_releases['latest']['download']
}}"
-
name
:
Show selected version
dest
:
/tmp/install-miniconda.sh
debug
:
msg="{{ conda_installer_version_info }}"
checksum
:
"
md5:{{
conda_releases['latest']['MD5']
}}"
mode
:
0550
-
name
:
Define installation directory path with version
-
name
:
Create conda folder
set_fact
:
file
:
conda_installer_path
:
"
{{
conda_installer_dir
}}/{{
conda_installer_distribution
}}{{
conda_installer_python_version
}}"
path
:
/opt/miniconda3
state
:
directory
-
name
:
Check Conda installation
owner
:
vagrant
stat
:
mode
:
755
path
:
"
{{
conda_installer_path
}}"
recurse
:
true
get_checksum
:
false
-
name
:
Run the installer
register
:
check_conda
shell
:
/tmp/install-miniconda.sh -b -u -p /opt/miniconda3
-
name
:
Remove the installer
-
debug
:
msg="Conda exists {{ check_conda.stat.exists }}"
file
:
#- import_tasks: install.yml
state
:
absent
\ No newline at end of file
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
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