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 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 # 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 - name: Update apt cache and install various dependencies
apt: name={{ item }} state=latest update_cache=yes apt: name={{ packages }} state=latest update_cache=yes
with_items: vars:
packages:
- imagemagick - imagemagick
- ffmpeg - ffmpeg
- libpq-dev - libpq-dev

View File

@ -3,8 +3,9 @@
# database user # database user
- name: Install PostgreSQL server and related packages - name: Install PostgreSQL server and related packages
apt: name={{ item }} state=latest update_cache=yes apt: name={{ packages }} state=latest update_cache=yes
with_items: vars:
packages:
- postgresql - postgresql
- postgresql-contrib - postgresql-contrib
- python-psycopg2 - python-psycopg2

View File

@ -2,7 +2,8 @@
# This playbook installs Redis for Mastodon's user # This playbook installs Redis for Mastodon's user
- name: Install redis - name: Install redis
apt: name={{ item }} state=latest update_cache=yes apt: name={{ packages }} state=latest update_cache=yes
with_items: vars:
packages:
- redis-tools - redis-tools
- redis-server - redis-server