2017-11-24 17:36:57 +00:00
|
|
|
---
|
|
|
|
# This role installs packages that every Mastodon server needs and does common
|
|
|
|
# node setup
|
2018-08-22 08:18:32 +00:00
|
|
|
- name: Install required ansible things
|
|
|
|
shell: apt-get update && apt-get -y install python-apt apt-transport-https git sudo
|
2017-11-24 17:36:57 +00:00
|
|
|
- name: Add Nodesource apt key
|
2017-11-24 17:50:45 +00:00
|
|
|
apt_key: url="https://deb.nodesource.com/gpgkey/nodesource.gpg.key" state=present
|
|
|
|
- name: Add Nodesource apt repositories
|
|
|
|
apt_repository: repo={{ item }} state=present
|
|
|
|
with_items:
|
2020-08-22 23:26:13 +00:00
|
|
|
- "deb https://deb.nodesource.com/node_12.x {{ ansible_distribution_release }} main"
|
|
|
|
- "deb-src https://deb.nodesource.com/node_12.x {{ ansible_distribution_release }} main"
|
2017-11-24 17:36:57 +00:00
|
|
|
- name: Add Yarnpkg apt key
|
2017-11-24 17:55:10 +00:00
|
|
|
apt_key: url="https://dl.yarnpkg.com/debian/pubkey.gpg" state=present
|
2017-11-24 17:36:57 +00:00
|
|
|
- name: Add Yarnpkg apt repository
|
2017-11-24 17:55:57 +00:00
|
|
|
apt_repository: repo="deb https://dl.yarnpkg.com/debian/ stable main" state=present
|
2017-11-24 17:36:57 +00:00
|
|
|
# Note that we don't install nginx, letsencrypt, postgresql and redis here, that will be in different roles
|
|
|
|
- name: Update apt cache and install various dependencies
|
2019-07-22 00:49:06 +00:00
|
|
|
apt: name={{ packages }} state=latest update_cache=yes
|
|
|
|
vars:
|
|
|
|
packages:
|
2017-11-24 17:47:18 +00:00
|
|
|
- imagemagick
|
|
|
|
- ffmpeg
|
|
|
|
- libpq-dev
|
|
|
|
- libxml2-dev
|
|
|
|
- libxslt1-dev
|
|
|
|
- file
|
|
|
|
- git-core
|
|
|
|
- g++
|
|
|
|
- libprotobuf-dev
|
|
|
|
- protobuf-compiler
|
|
|
|
- pkg-config
|
|
|
|
- nodejs
|
|
|
|
- gcc
|
|
|
|
- autoconf
|
|
|
|
- bison
|
|
|
|
- build-essential
|
|
|
|
- libssl-dev
|
|
|
|
- libyaml-dev
|
|
|
|
- libreadline6-dev
|
|
|
|
- zlib1g-dev
|
|
|
|
- libncurses5-dev
|
|
|
|
- libffi-dev
|
|
|
|
- libgdbm-dev
|
|
|
|
- yarn
|
|
|
|
- libidn11-dev
|
|
|
|
- libicu-dev
|
2017-12-11 16:34:33 +00:00
|
|
|
- libjemalloc1
|
|
|
|
- libjemalloc-dev
|
2017-11-24 17:36:57 +00:00
|
|
|
- name: Add mastodon system user
|
2018-05-28 17:10:45 +00:00
|
|
|
user: name=mastodon shell=/bin/bash state=present
|