Set correct rbenv+ruby-build PATH everywhere needed
This commit is contained in:
parent
f2a01638da
commit
c13efa8bd4
|
@ -11,15 +11,19 @@
|
||||||
become: true
|
become: true
|
||||||
become_user: mastodon
|
become_user: mastodon
|
||||||
- name: Install bundler
|
- name: Install bundler
|
||||||
shell: cd /home/mastodon/live && /home/mastodon/.rbenv/shims/gem install bundler
|
shell: cd /home/mastodon/live && gem install bundler
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
|
environment:
|
||||||
|
PATH: '/home/mastodon/.rbenv/bin:/home/mastodon/.rbenv/shims:/home/mastodon/.rbenv/plugins/ruby-build/bin:{{ ansible_env.PATH }}'
|
||||||
become: true
|
become: true
|
||||||
become_user: mastodon
|
become_user: mastodon
|
||||||
- name: Use bundler to install the rest of the Ruby dependencies
|
- name: Use bundler to install the rest of the Ruby dependencies
|
||||||
shell: cd /home/mastodon/live && /home/mastodon/.rbenv/shims/bundle install --deployment --without development test
|
shell: cd /home/mastodon/live && bundle install --deployment --without development test
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
|
environment:
|
||||||
|
PATH: '/home/mastodon/.rbenv/bin:/home/mastodon/.rbenv/shims:/home/mastodon/.rbenv/plugins/ruby-build/bin:{{ ansible_env.PATH }}'
|
||||||
become: true
|
become: true
|
||||||
become_user: mastodon
|
become_user: mastodon
|
||||||
- name: Use yarn to install node.js dependencies
|
- name: Use yarn to install node.js dependencies
|
||||||
|
|
|
@ -4,28 +4,31 @@
|
||||||
# cron job
|
# cron job
|
||||||
|
|
||||||
- name: Generate PAPERCLIP_SECRET and register it
|
- name: Generate PAPERCLIP_SECRET and register it
|
||||||
shell: cd /home/mastodon/live && /home/mastodon/.rbenv/shims/bundle exec rake secret
|
shell: cd /home/mastodon/live && bundle exec rake secret
|
||||||
register: PAPERCLIP_SECRET
|
register: PAPERCLIP_SECRET
|
||||||
environment:
|
environment:
|
||||||
RAILS_ENV: production
|
RAILS_ENV: production
|
||||||
|
PATH: '/home/mastodon/.rbenv/bin:/home/mastodon/.rbenv/shims:/home/mastodon/.rbenv/plugins/ruby-build/bin:{{ ansible_env.PATH }}'
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
become: true
|
become: true
|
||||||
become_user: mastodon
|
become_user: mastodon
|
||||||
- name: Generate SECRET_KEY_BASE and register it
|
- name: Generate SECRET_KEY_BASE and register it
|
||||||
shell: cd /home/mastodon/live && /home/mastodon/.rbenv/shims/bundle exec rake secret
|
shell: cd /home/mastodon/live && bundle exec rake secret
|
||||||
register: SECRET_KEY_BASE
|
register: SECRET_KEY_BASE
|
||||||
environment:
|
environment:
|
||||||
RAILS_ENV: production
|
RAILS_ENV: production
|
||||||
|
PATH: '/home/mastodon/.rbenv/bin:/home/mastodon/.rbenv/shims:/home/mastodon/.rbenv/plugins/ruby-build/bin:{{ ansible_env.PATH }}'
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
become: true
|
become: true
|
||||||
become_user: mastodon
|
become_user: mastodon
|
||||||
- name: Generate OTP_SECRET and register it
|
- name: Generate OTP_SECRET and register it
|
||||||
shell: cd /home/mastodon/live && /home/mastodon/.rbenv/shims/bundle exec rake secret
|
shell: cd /home/mastodon/live && bundle exec rake secret
|
||||||
register: OTP_SECRET
|
register: OTP_SECRET
|
||||||
environment:
|
environment:
|
||||||
RAILS_ENV: production
|
RAILS_ENV: production
|
||||||
|
PATH: '/home/mastodon/.rbenv/bin:/home/mastodon/.rbenv/shims:/home/mastodon/.rbenv/plugins/ruby-build/bin:{{ ansible_env.PATH }}'
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
become: true
|
become: true
|
||||||
|
@ -38,10 +41,11 @@
|
||||||
become: true
|
become: true
|
||||||
become_user: mastodon
|
become_user: mastodon
|
||||||
- name: Generate VAPID keys and register it
|
- name: Generate VAPID keys and register it
|
||||||
shell: cd /home/mastodon/live && /home/mastodon/.rbenv/shims/bundle exec rake mastodon:webpush:generate_vapid_key
|
shell: cd /home/mastodon/live && bundle exec rake mastodon:webpush:generate_vapid_key
|
||||||
register: VAPID_KEYS
|
register: VAPID_KEYS
|
||||||
environment:
|
environment:
|
||||||
RAILS_ENV: production
|
RAILS_ENV: production
|
||||||
|
PATH: '/home/mastodon/.rbenv/bin:/home/mastodon/.rbenv/shims:/home/mastodon/.rbenv/plugins/ruby-build/bin:{{ ansible_env.PATH }}'
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
become: true
|
become: true
|
||||||
|
@ -53,18 +57,20 @@
|
||||||
become: true
|
become: true
|
||||||
become_user: mastodon
|
become_user: mastodon
|
||||||
- name: Precompile Mastodon static assets
|
- name: Precompile Mastodon static assets
|
||||||
shell: cd /home/mastodon/live && /home/mastodon/.rbenv/shims/bundle exec rails assets:precompile
|
shell: cd /home/mastodon/live && bundle exec rails assets:precompile
|
||||||
environment:
|
environment:
|
||||||
RAILS_ENV: production
|
RAILS_ENV: production
|
||||||
|
PATH: '/home/mastodon/.rbenv/bin:/home/mastodon/.rbenv/shims:/home/mastodon/.rbenv/plugins/ruby-build/bin:{{ ansible_env.PATH }}'
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
become: true
|
become: true
|
||||||
become_user: mastodon
|
become_user: mastodon
|
||||||
- name: Run Mastodon database setup
|
- name: Run Mastodon database setup
|
||||||
shell: cd /home/mastodon/live && /home/mastodon/.rbenv/shims/bundle exec rails db:setup
|
shell: cd /home/mastodon/live && bundle exec rails db:setup
|
||||||
environment:
|
environment:
|
||||||
RAILS_ENV: production
|
RAILS_ENV: production
|
||||||
SAFETY_ASSURED: 1
|
SAFETY_ASSURED: 1
|
||||||
|
PATH: '/home/mastodon/.rbenv/bin:/home/mastodon/.rbenv/shims:/home/mastodon/.rbenv/plugins/ruby-build/bin:{{ ansible_env.PATH }}'
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
become: true
|
become: true
|
||||||
|
|
|
@ -29,8 +29,10 @@
|
||||||
become: true
|
become: true
|
||||||
become_user: mastodon
|
become_user: mastodon
|
||||||
- name: Install Ruby and set it as the user's default
|
- name: Install Ruby and set it as the user's default
|
||||||
shell: /home/mastodon/.rbenv/bin/rbenv install 2.4.2 || /home/mastodon/.rbenv/bin/rbenv global 2.4.2
|
shell: rbenv install 2.4.2 || rbenv global 2.4.2
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
|
environment:
|
||||||
|
PATH: '/home/mastodon/.rbenv/bin:/home/mastodon/.rbenv/shims:/home/mastodon/.rbenv/plugins/ruby-build/bin:{{ ansible_env.PATH }}'
|
||||||
become: true
|
become: true
|
||||||
become_user: mastodon
|
become_user: mastodon
|
||||||
|
|
Loading…
Reference in New Issue