roles/common: Use an Ansible fact for Ubuntu packages

This commit is contained in:
Alan Orth 2018-12-20 09:36:43 +02:00
parent 46bbb06527
commit 281689e506
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -8,9 +8,9 @@
- name: Upgrade base OS
apt: upgrade=dist update_cache=yes
- name: Install base packages
apt: pkg={{ item }}
loop:
- name: Set Ubuntu base packages
set_fact:
ubuntu_base_packages:
- git
- tmux
- iotop
@ -28,6 +28,10 @@
- unzip
- apt-transport-https # for https support in apt
- name: Install base packages
apt: pkg={{ ubuntu_base_packages }} state=present update_cache=yes
loop:
- name: Security hardening (CIS Benchmark 1.0)
apt: pkg={{ item }} state=absent purge=yes
loop: