Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Commit

Permalink
Address permissions errors (see: rbenv/ruby-build#748)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgarber623 committed May 22, 2018
1 parent 946f165 commit f0611a7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
5 changes: 3 additions & 2 deletions roles/ruby/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ ruby_homebrew_packages:
- ruby-build

ruby_directories:
- .bundle
- .rbenv
- /opt/rubies
- ~/.bundle
- ~/.rbenv

ruby_linked_files:
- .bundle/config
Expand Down
11 changes: 9 additions & 2 deletions roles/ruby/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,17 @@

- name: Create directories
file:
path: "~/{{ item }}"
path: "{{ item }}"
state: directory
with_items: "{{ ruby_directories }}"

- name: Link Ruby installation directory
file:
src: /opt/rubies
dest: ~/.rbenv/versions
state: link
force: yes

- name: Link configuration files
file:
src: "{{ role_path }}/files/{{ item }}"
Expand All @@ -21,7 +28,7 @@
- name: Install Ruby versions
command: "rbenv install {{ item }}"
args:
creates: "~/.rbenv/versions/{{ item }}"
creates: "/opt/rubies/{{ item }}"
with_items: "{{ ruby_versions }}"

- name: Set global Ruby version
Expand Down

0 comments on commit f0611a7

Please sign in to comment.