mastible/roles/common/tasks/main.yml

52 lines
1.6 KiB
YAML

---
# This role installs packages that every Mastodon server needs and does common
# node setup
- name: Install required ansible things
shell: apt-get update && apt-get -y install python-apt apt-transport-https git sudo
- name: Add Nodesource apt key
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:
- "deb https://deb.nodesource.com/node_8.x {{ ansible_distribution_release }} main"
- "deb-src https://deb.nodesource.com/node_8.x {{ ansible_distribution_release }} main"
- name: Add Yarnpkg apt key
apt_key: url="https://dl.yarnpkg.com/debian/pubkey.gpg" state=present
- name: Add Yarnpkg apt repository
apt_repository: repo="deb https://dl.yarnpkg.com/debian/ stable main" state=present
# 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
apt: name={{ packages }} state=latest update_cache=yes
vars:
packages:
- 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
- libjemalloc1
- libjemalloc-dev
- name: Add mastodon system user
user: name=mastodon shell=/bin/bash state=present