diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index f664cbe..63a129c 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -16,8 +16,9 @@ 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={{ item }} state=latest update_cache=yes - with_items: + apt: name={{ packages }} state=latest update_cache=yes + vars: + packages: - imagemagick - ffmpeg - libpq-dev diff --git a/roles/mastodon-postgresql/tasks/main.yml b/roles/mastodon-postgresql/tasks/main.yml index 3cb2361..448e6a2 100644 --- a/roles/mastodon-postgresql/tasks/main.yml +++ b/roles/mastodon-postgresql/tasks/main.yml @@ -3,8 +3,9 @@ # database user - name: Install PostgreSQL server and related packages - apt: name={{ item }} state=latest update_cache=yes - with_items: + apt: name={{ packages }} state=latest update_cache=yes + vars: + packages: - postgresql - postgresql-contrib - python-psycopg2 diff --git a/roles/mastodon-redis/tasks/main.yml b/roles/mastodon-redis/tasks/main.yml index a658542..27a2dbc 100644 --- a/roles/mastodon-redis/tasks/main.yml +++ b/roles/mastodon-redis/tasks/main.yml @@ -2,7 +2,8 @@ # This playbook installs Redis for Mastodon's user - name: Install redis - apt: name={{ item }} state=latest update_cache=yes - with_items: + apt: name={{ packages }} state=latest update_cache=yes + vars: + packages: - redis-tools - redis-server