How to manage auditd using ansible ?

Solution Verified - Updated -


  • How to reload/restart/stop auditd using ansible?
  • Reloading auditd.service using service module of ansible fails with following error :
$ cat test.yml 
- name: Testing Service Module
  hosts: test
   - name: Reload Auditd
        name: auditd
        state: reloaded

$ ansible-playbook test.yml
TASK [Reload Auditd] ***********************************************************************************
fatal: []: FAILED! => {"changed": false, "msg": "Unable to reload service auditd: Failed to reload auditd.service: Job type reload is not applicable for unit auditd.service.\nSee system logs and 'systemctl status auditd.service' for details.\n"}


  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8
  • ansible
  • auditd

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In