rearranged tasks
This commit is contained in:
@@ -5,15 +5,7 @@
|
||||
repo: "https://github.com/rbenv/rbenv.git"
|
||||
dest: "{{ mastodon_home }}/.rbenv"
|
||||
clone: true
|
||||
version: "{{ rbenv_version }}"
|
||||
|
||||
- name: mastodon | Clone ruby-build
|
||||
git:
|
||||
repo: "https://github.com/rbenv/ruby-build.git"
|
||||
dest: "{{ mastodon_home }}/.rbenv/plugins/ruby-build"
|
||||
clone: true
|
||||
version: "{{ ruby_build_version }}"
|
||||
register: ruby_build
|
||||
# version: "{{ rbenv_version }}"
|
||||
|
||||
- name: mastodon | Configure rbenv
|
||||
command: ./configure
|
||||
@@ -34,6 +26,14 @@
|
||||
export PATH="{{ mastodon_home }}/.rbenv/bin:${PATH}"
|
||||
eval "$(rbenv init -)"
|
||||
|
||||
- name: mastodon | Clone ruby-build
|
||||
git:
|
||||
repo: "https://github.com/rbenv/ruby-build.git"
|
||||
dest: "{{ mastodon_home }}/.rbenv/plugins/ruby-build"
|
||||
clone: true
|
||||
version: "{{ ruby_build_version }}"
|
||||
register: ruby_build
|
||||
|
||||
- name: mastodon | Check if the Ruby version is already installed
|
||||
shell: "{{ mastodon_home }}/.rbenv/bin/rbenv versions | grep -q {{ ruby_version }}"
|
||||
register: ruby_installed
|
||||
@@ -41,7 +41,7 @@
|
||||
check_mode: no
|
||||
|
||||
- name: mastodon | Install Ruby {{ ruby_version }}
|
||||
shell: "{{ mastodon_home }}/.rbenv/bin/rbenv install {{ ruby_version }}"
|
||||
shell: "RUBY_CONFIGURE_OPTS=--with-jemalloc {{ mastodon_home }}/.rbenv/bin/rbenv install {{ ruby_version }}"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
when: ruby_installed is failed
|
||||
|
||||
Reference in New Issue
Block a user