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
|
|
|
|
2024-11-25 18:24:56 +10:00
|
|
|
---
|
2025-01-14 20:18:57 +10: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:
|
2025-01-14 20:18:57 +10:00
|
|
|
- name: Expire-caches
|
2024-12-19 11:22:24 +10:00
|
|
|
ansible.builtin.command: yum clean expire-cache
|
2016-08-08 19:36:31 +00:00
|
|
|
|
2025-01-14 20:18:57 +10:00
|
|
|
- name: Yum -y {{ yumcommand }}
|
2024-12-19 11:22:24 +10:00
|
|
|
ansible.builtin.command: yum -y {{ yumcommand }}
|
2013-02-27 21:31:53 +00:00
|
|
|
async: 7200
|
|
|
|
poll: 15
|
2012-12-10 18:19:36 +00:00
|
|
|
|
2025-01-14 20:18:57 +10:00
|
|
|
- name: Check for rkhunter
|
2024-12-19 11:22:24 +10:00
|
|
|
ansible.builtin.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
|
|
|
|
2025-01-14 20:18:57 +10:00
|
|
|
- name: Run rkhunter --propupd
|
2024-12-19 11:22:24 +10:00
|
|
|
ansible.builtin.command: /usr/bin/rkhunter --propupd
|
2018-04-04 19:24:21 +00:00
|
|
|
when: rkhunter is success
|