Add possibility to skip bundler installation
This commit is contained in:
@@ -30,6 +30,9 @@ Below is a list of default values that you can configure:
|
|||||||
rvm1_rubies:
|
rvm1_rubies:
|
||||||
- 'ruby-2.1.3'
|
- 'ruby-2.1.3'
|
||||||
|
|
||||||
|
# Install the bundler gem
|
||||||
|
rvm1_bundler_install: True
|
||||||
|
|
||||||
# Delete a specific version of ruby (ie. ruby-2.1.0)
|
# Delete a specific version of ruby (ie. ruby-2.1.0)
|
||||||
rvm1_delete_ruby:
|
rvm1_delete_ruby:
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,9 @@
|
|||||||
rvm1_rubies:
|
rvm1_rubies:
|
||||||
- 'ruby-2.3.1'
|
- 'ruby-2.3.1'
|
||||||
|
|
||||||
|
# Install bundler
|
||||||
|
rvm1_bundler_install: True
|
||||||
|
|
||||||
# Delete a specific version of ruby (ie. ruby-2.1.0)
|
# Delete a specific version of ruby (ie. ruby-2.1.0)
|
||||||
rvm1_delete_ruby:
|
rvm1_delete_ruby:
|
||||||
|
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
args:
|
args:
|
||||||
creates: '{{ rvm1_install_path }}/wrappers/{{ item.stdout }}/bundler'
|
creates: '{{ rvm1_install_path }}/wrappers/{{ item.stdout }}/bundler'
|
||||||
with_items: '{{ ruby_patch.results }}'
|
with_items: '{{ ruby_patch.results }}'
|
||||||
|
when: rvm1_bundler_install
|
||||||
register: bundler_install
|
register: bundler_install
|
||||||
changed_when: '"Successfully installed bundler" in bundler_install.stdout'
|
changed_when: '"Successfully installed bundler" in bundler_install.stdout'
|
||||||
become: yes
|
become: yes
|
||||||
@@ -61,6 +62,16 @@
|
|||||||
when: not '--user-install' in rvm1_install_flags
|
when: not '--user-install' in rvm1_install_flags
|
||||||
with_items: '{{ rvm1_symlink_binaries }}'
|
with_items: '{{ rvm1_symlink_binaries }}'
|
||||||
|
|
||||||
|
- name: Symlink bundler binaries on the system path
|
||||||
|
file:
|
||||||
|
state: 'link'
|
||||||
|
src: '{{ rvm1_install_path }}/wrappers/default/{{ item }}'
|
||||||
|
dest: '{{ rvm1_symlink_to }}/{{ item }}'
|
||||||
|
owner: '{{ root_user }}'
|
||||||
|
group: '{{ root_group }}'
|
||||||
|
when: not '--user-install' in rvm1_install_flags and rvm1_bundler_install
|
||||||
|
with_items: '{{ rvm1_symlink_bundler_binaries }}'
|
||||||
|
|
||||||
- name: Detect if ruby version can be deleted
|
- name: Detect if ruby version can be deleted
|
||||||
command: '{{ rvm1_rvm }} {{ rvm1_delete_ruby }} do true'
|
command: '{{ rvm1_rvm }} {{ rvm1_delete_ruby }} do true'
|
||||||
changed_when: False
|
changed_when: False
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ rvm1_default_ruby_version: '{{ rvm1_rubies | last if rvm1_rubies and rvm1_rubies
|
|||||||
rvm1_rvm: '{{ rvm1_install_path }}/bin/rvm'
|
rvm1_rvm: '{{ rvm1_install_path }}/bin/rvm'
|
||||||
|
|
||||||
rvm1_symlink_binaries:
|
rvm1_symlink_binaries:
|
||||||
- 'bundle'
|
|
||||||
- 'bundler'
|
|
||||||
- 'erb'
|
- 'erb'
|
||||||
- 'executable-hooks-uninstaller'
|
- 'executable-hooks-uninstaller'
|
||||||
- 'gem'
|
- 'gem'
|
||||||
@@ -19,4 +17,8 @@ rvm1_symlink_binaries:
|
|||||||
- 'ruby'
|
- 'ruby'
|
||||||
- 'testrb'
|
- 'testrb'
|
||||||
|
|
||||||
|
rvm1_symlink_bundler_binaries:
|
||||||
|
- 'bundle'
|
||||||
|
- 'bundler'
|
||||||
|
|
||||||
rvm1_symlink_to: '/usr/local/bin'
|
rvm1_symlink_to: '/usr/local/bin'
|
||||||
|
|||||||
Reference in New Issue
Block a user