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