diff --git a/playbooks/host_update.yml b/playbooks/host_update.yml new file mode 100644 index 0000000000..bcd21f9ea2 --- /dev/null +++ b/playbooks/host_update.yml @@ -0,0 +1,34 @@ +# This playbook updates hosts without guests. +# +# requires --extra-vars="target=somehostname yumcommand=update" + + +- name: update the system + hosts: "{{ target }}" + accelerate: true + gather_facts: false + user: root + + tasks: + - name: expire-caches + command: yum clean expire-cache + + - name: yum -y {{ yumcommand }} + command: yum -y {{ yumcommand }} + async: 7200 + poll: 30 + +- name: run rkhunter if installed + hosts: "{{ target }}" + accelerate: true + user: root + + tasks: + - name: check for rkhunter + command: /usr/bin/test -f /usr/bin/rkhunter + register: rkhunter + ignore_errors: true + + - name: run rkhunter --propupd + command: /usr/bin/rkhunter --propupd + when: rkhunter|success