Switch away from using with_items for apt uses

This commit is contained in:
staticsafe 2019-07-21 20:49:06 -04:00
parent 43a0c80949
commit 494e60bfd2
3 changed files with 9 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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