ansible/playbooks/package_update.yml
Seth Vidal a4f319d83d remove some old files
rename a bunch of places from '-' to '_'
2013-05-03 17:23:32 +00:00

28 lines
595 B
YAML

# requires --extra-vars="target='host1;host2;group etc' yumcommand=update'"
- name: update all run rkhunter if installed
hosts: $target
user: root
tasks:
- name: expire-caches
action: command yum clean expire-cache
- name: yum -y ${yumcommand}
action: command yum -y ${yumcommand}
async: 7200
poll: 15
- name: check for rkhunter
action: command /usr/bin/test -f /usr/bin/rkhunter
register: rkhunter
ignore_errors: true
- name: run rkhunter --propupd
action: command /usr/bin/rkhunter --propupd
only_if: "'${rkhunter.rc}' == '0'"