forked from infra/ansible
firt cut of package-update playbook - needs testing
This commit is contained in:
parent
051b28fd6c
commit
cf1199ac3d
1 changed files with 22 additions and 0 deletions
22
playbooks/package-update.yml
Normal file
22
playbooks/package-update.yml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# requires --extra-vars="hostlist='host1 host2 group etc'"
|
||||
|
||||
- name: update all run rkhunter if installed
|
||||
hosts: $hostlist
|
||||
user: root
|
||||
|
||||
tasks:
|
||||
- name: yum update
|
||||
action: command yum -y update
|
||||
|
||||
- name: check for rkhunter
|
||||
action: command /usr/bin/test -f /usr/bin/rkhunter
|
||||
register: rkhunter
|
||||
|
||||
- name: run rkhunter --propupd
|
||||
action: command /usr/bin/rkhunter --propupd
|
||||
only_if: "'${rkhunter.rc}' == '0'"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue