From 1ff28544c1c587220c6ecebc2ad9e2008eec1661 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 10 Apr 2019 21:18:52 +0000 Subject: [PATCH] vhost_update: add in some basic excludes handling Signed-off-by: Kevin Fenzi --- playbooks/vhost_update.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/playbooks/vhost_update.yml b/playbooks/vhost_update.yml index 86f3605f00..91d7d4005b 100644 --- a/playbooks/vhost_update.yml +++ b/playbooks/vhost_update.yml @@ -42,6 +42,7 @@ user: root tasks: + - name: Apply updates package: state: latest @@ -49,6 +50,23 @@ update_cache: true async: 7200 poll: 30 + + - debug: + msg: + - '!!!!!!!!!!!!!!!!!!! host {{ inventory_hostname }} has EXCLUDES OF {{ package_excludes }} !!!!!!!!!!!!!' + - '!!!!!!!!!!!!!!!!!!! DANGER DANGER DANGER ^ CHECK THAT EXCLUDES ARE STILL NEEDED ^ !!!!!!!!!!!!!!!!!!!!' + when: package_excludes is defined + changed_when: true + + - name: Apply updates with excludes + package: + state: latest + name: "*" + update_cache: true + exclude: "{{ package_excludes }}" + async: 7200 + poll: 30 + when: package_excludes is defined - name: run rkhunter if installed hosts: "{{ target }}:myvms_new"