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