diff --git a/roles/mastodon-app/tasks/main.yml b/roles/mastodon-app/tasks/main.yml new file mode 100644 index 0000000..e123a72 --- /dev/null +++ b/roles/mastodon-app/tasks/main.yml @@ -0,0 +1,30 @@ +--- +# 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.0.0 + become: true + become_user: mastodon +- name: Install bundler + shell: cd /home/mastodon/live && /home/mastodon/.rbenv/shims/gem install bundler + args: + executable: /bin/bash + become: true + become_user: mastodon +- 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 + args: + executable: /bin/bash + 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 diff --git a/site.yml b/site.yml index 0f562b9..9503f0f 100644 --- a/site.yml +++ b/site.yml @@ -4,3 +4,4 @@ roles: - common - ruby + - mastodon-app