# requires --extra-vars="target='host1:host2:group etc'" --- - name: Run rkhunter for times when rkhunter didn't seem to run. hosts: "{{ target }}" user: root tasks: - name: Check for rkhunter ansible.builtin.command: /usr/bin/test -f /usr/bin/rkhunter register: rkhunter ignore_errors: true - name: Run rkhunter --propupd ansible.builtin.command: /usr/bin/rkhunter --propupd when: rkhunter is success