Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
a4e66f6f
Commit
a4e66f6f
authored
Sep 04, 2013
by
Jason Bau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle cases where we need to refresh ruby-build due to new ruby version
parent
b8a2e149
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
playbooks/roles/rbenv/tasks/main.yml
+16
-6
No files found.
playbooks/roles/rbenv/tasks/main.yml
View file @
a4e66f6f
...
...
@@ -136,20 +136,30 @@
-
ruby
-
install
-
name
:
rbenv | if ruby-build exists, which versions we can install
command
:
/usr/local/bin/ruby-build --definitions
when
:
rbuild_present|success
register
:
installable_ruby_vers
ignore_errors
:
yes
tags
:
-
ruby
-
install
### in this block, we (re)install ruby-build if it doesn't exist or if it can't install the requested version
-
name
:
rbenv | create temporary directory
command
:
mktemp -d
register
:
tempdir
sudo
:
true
sudo_user
:
"
{{
rbenv_user
}}"
when
:
rbuild_present|failed
sudo_user
:
"
{{
rbenv_user
}}"
when
:
rbuild_present|failed
or (installable_ruby_vers is defined and rbenv_ruby_version not in installable_ruby_vers)
tags
:
-
ruby
-
install
-
name
:
rbenv | clone ruby-build repo
git
:
repo=https://github.com/sstephenson/ruby-build.git dest={{ tempdir.stdout }}/ruby-build
when
:
rbuild_present|failed
sudo
:
true
when
:
rbuild_present|failed or (installable_ruby_vers is defined and rbenv_ruby_version not in installable_ruby_vers)
sudo
:
true
sudo_user
:
"
{{
rbenv_user
}}"
tags
:
-
ruby
...
...
@@ -157,14 +167,14 @@
-
name
:
rbenv | install ruby-build
command
:
./install.sh chdir={{ tempdir.stdout }}/ruby-build
when
:
rbuild_present|failed
when
:
rbuild_present|failed
or (installable_ruby_vers is defined and rbenv_ruby_version not in installable_ruby_vers)
tags
:
-
ruby
-
install
-
name
:
rbenv | remove temporary directory
file
:
path={{ tempdir.stdout }} state=absent
when
:
rbuild_present|failed
when
:
rbuild_present|failed
or (installable_ruby_vers is defined and rbenv_ruby_version not in installable_ruby_vers)
tags
:
-
ruby
-
install
...
...
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