28 lines
595 B
YAML
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'"
|
|
|
|
|
|
|
|
|
|
|