2016-02-02 21:03:19 +00:00
|
|
|
# requires --extra-vars="target='host1:host2:group etc' yumcommand=update'"
|
2012-12-10 18:19:36 +00:00
|
|
|
|
|
|
|
- name: update all run rkhunter if installed
|
2014-01-01 19:15:11 +00:00
|
|
|
hosts: "{{ target }}"
|
2012-12-10 18:19:36 +00:00
|
|
|
user: root
|
|
|
|
|
|
|
|
tasks:
|
2012-12-10 19:42:33 +00:00
|
|
|
- name: expire-caches
|
2013-08-19 20:12:26 +00:00
|
|
|
command: yum clean expire-cache
|
2016-08-08 19:36:31 +00:00
|
|
|
|
2014-01-01 19:15:11 +00:00
|
|
|
- name: yum -y {{ yumcommand }}
|
|
|
|
command: yum -y {{ yumcommand }}
|
2013-02-27 21:31:53 +00:00
|
|
|
async: 7200
|
|
|
|
poll: 15
|
2012-12-10 18:19:36 +00:00
|
|
|
|
|
|
|
- name: check for rkhunter
|
2013-08-19 20:12:26 +00:00
|
|
|
command: /usr/bin/test -f /usr/bin/rkhunter
|
2012-12-10 18:19:36 +00:00
|
|
|
register: rkhunter
|
2012-12-10 18:25:32 +00:00
|
|
|
ignore_errors: true
|
2016-08-08 19:36:31 +00:00
|
|
|
|
2012-12-10 18:19:36 +00:00
|
|
|
- name: run rkhunter --propupd
|
2013-08-19 20:12:26 +00:00
|
|
|
command: /usr/bin/rkhunter --propupd
|
2018-04-04 19:24:21 +00:00
|
|
|
when: rkhunter is success
|