Added host_update box

This commit is contained in:
Stephen Smoogen
2013-12-20 21:47:29 +00:00
parent e0fae8047a
commit 5e7d24235d

34
playbooks/host_update.yml Normal file
View File

@@ -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