mastible/roles/mastodon-app/tasks/main.yml

35 lines
1.2 KiB
YAML
Raw Normal View History

2017-11-26 21:32:46 +00:00
---
# All tasks in this role should be done as the mastodon user
# This role clones the Mastodon GitHub repository and installs
# it's node.js and Ruby dependencies
- name: Clone Mastodon git repository
git:
repo: 'https://github.com/tootsuite/mastodon.git'
dest: /home/mastodon/live
version: v2.1.3
2017-11-26 21:32:46 +00:00
become: true
become_user: mastodon
- name: Install bundler
shell: cd /home/mastodon/live && gem install bundler
2017-11-26 21:32:46 +00:00
args:
executable: /bin/bash
environment:
PATH: '/home/mastodon/.rbenv/bin:/home/mastodon/.rbenv/shims:/home/mastodon/.rbenv/plugins/ruby-build/bin:{{ ansible_env.PATH }}'
2017-11-26 21:32:46 +00:00
become: true
become_user: mastodon
- name: Use bundler to install the rest of the Ruby dependencies
shell: cd /home/mastodon/live && bundle install --deployment --without development test
2017-11-26 21:32:46 +00:00
args:
executable: /bin/bash
environment:
PATH: '/home/mastodon/.rbenv/bin:/home/mastodon/.rbenv/shims:/home/mastodon/.rbenv/plugins/ruby-build/bin:{{ ansible_env.PATH }}'
2017-11-26 21:32:46 +00:00
become: true
become_user: mastodon
- name: Use yarn to install node.js dependencies
shell: cd /home/mastodon/live && yarn install --pure-lockfile
args:
executable: /bin/bash
become: true
become_user: mastodon