Files
ansible/roles/mastodon/tasks/rbenv.yml

39 lines
1.0 KiB
YAML

---
- name: git rbenv
remote_user: mastodon
git:
repo: "https://github.com/rbenv/rbenv.git"
dest: "{{ mastodon_home }}/.rbenv"
single_branch: true
version: master
- name: git ruby-build
remote_user: mastodon
git:
repo: https://github.com/rbenv/ruby-build.git
dest: "{{ mastodon_home }}/.rbenv/plugins/ruby-build"
single_branch: true
version: master
- name: append env to mastodon bashrc
remote_user: mastodon
lineinfile:
path: "{{ mastodon_home }}/.bashrc"
line: "eval \"$({{ mastodon_home }}/.rbenv/bin/rbenv init - bash)\""
- name: install ruby version
remote_user: mastodon
shell: "bash -lic 'rbenv install {{ mastodon_ruby_version }}'"
args:
executable: /bin/bash
creates: "~/.rbenv/versions/{{ mastodon_ruby_version }}/bin/ruby"
environment:
RUBY_CONFIGURE_OPTS: "--with-jemalloc"
- name: install bundler for ruby
remote_user: mastodon
shell: "bash -lic 'rbenv global {{ mastodon_ruby_version }} && ruby --version && gem install bundler --no-document'"
args:
executable: /bin/bash