diff --git a/webapps/mastodon/tasks/upgrade.yml b/webapps/mastodon/tasks/upgrade.yml index e0644c66..d1b8c57a 100644 --- a/webapps/mastodon/tasks/upgrade.yml +++ b/webapps/mastodon/tasks/upgrade.yml @@ -8,12 +8,19 @@ target: "~/{{ service }}_production.sql.gz" become_user: postgres +- name: Install Ruby for service user (rbenv) + include_role: + name: rbenv + vars: + - username: "{{ service }}" + - rbenv_ruby_version: "{{ ruby_version }}" + - name: Checkout (git) git: repo: "{{ git_url }}" dest: "~/mastodon/" version: "{{ git_version | default(omit) }}" - #force: yes + force: yes update: yes become_user: "{{ service }}" @@ -33,6 +40,11 @@ args: chdir: "~/mastodon" executable: /bin/bash # fails with /bin/sh + - name: Upgrade browsers list db + shell: ". ~/.profile && npx update-browserslist-db@latest" + args: + chdir: "~/mastodon" + executable: /bin/bash # fails with /bin/sh - name: Run database migrations, skipping post-deployment shell: ". ~/.profile && SKIP_POST_DEPLOYMENT_MIGRATIONS=true RAILS_ENV=production bundle exec rails db:migrate" args: @@ -57,7 +69,7 @@ state: restarted - name: Run database migrations, this time including post-deployment - shell: ". ~/.profile && SKIP_POST_DEPLOYMENT_MIGRATIONS=true RAILS_ENV=production bundle exec rails db:migrate" + shell: ". ~/.profile && RAILS_ENV=production bundle exec rails db:migrate" args: chdir: "~/mastodon" executable: /bin/bash # fails with /bin/sh