stop using with_items for apt in ubuntu/roles/common/tasks/main.yml

This commit is contained in:
staticsafe 2019-07-21 20:34:13 -04:00
parent 26d749a670
commit 32190262bc
1 changed files with 37 additions and 31 deletions

View File

@ -17,38 +17,44 @@
- restart rsyslog
- restart cron
- name: Install required packages
apt: pkg={{ item }} state=latest
with_items:
- most
- zsh
- vim
- vim-scripts
- git
- tmux
- multitail
- mtr-tiny
- curl
- dnsutils
- sudo
- gnupg
- traceroute
- htop
- haveged
- python-pip
- duplicity
- python-boto
- build-essential
- vnstat
- python-dev
- chrony
- unattended-upgrades
apt:
name: "{{ packages }}"
state: latest
vars:
packages:
- most
- zsh
- vim
- vim-scripts
- git
- tmux
- multitail
- mtr-tiny
- curl
- dnsutils
- sudo
- gnupg
- traceroute
- htop
- haveged
- python-pip
- duplicity
- python-boto
- build-essential
- vnstat
- python-dev
- chrony
- unattended-upgrades
- name: Remove packages we do not need
apt: pkg={{ item }} state=absent
with_items:
- exim4-daemon-light
- consolekit
- snapd
- lxcfs
apt:
name: "{{ packages }}"
state: absent
vars:
packages:
- exim4-daemon-light
- consolekit
- snapd
- lxcfs
- name: Ensure haveged, ntp, and vnstat are started on boot
service: name={{ item }} enabled=yes
with_items: