ansible/playbooks/rkhunter_update.yml
2016-08-08 19:36:31 +00:00

28 lines
562 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
command: yum clean expire-cache
- name: yum -y {{ yumcommand }}
command: yum -y {{ yumcommand }}
async: 7200
poll: 15
- 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