HarryHarcourt / Ansible-RHEL7-CIS-Benchmarks

This repository contains an Ansible Role for RHEL7 / CentOS based on the Center for Internet Security Benchmarks
MIT License
103 stars 73 forks source link

Update main.yml #18

Closed ghost closed 5 years ago

ghost commented 5 years ago

ON RHEL 7.6 and may be earlier. The current block does not work. I came across this in another project. The only way I found it does work is a shell script like the one provided.

HarryHarcourt commented 5 years ago

I think I noted something similar, but cannot remember the specifics. Instead of using the command, look at this URL, I will try it in the next couple of days

https://stackoverflow.com/questions/41053331/ansible-how-to-restart-auditd-service-on-centos-7-get-error-about-dependency

ghost commented 5 years ago

I just tested the code that I recommended for PR on RHEL 7.6. It ran with a warning, but worked.

HarryHarcourt commented 5 years ago

Hi Roman Let me test it with the Ansible Devs recommended solution and get back to you. I know the shell will work, but we do want to reduce the warnings. Best Ben

ghost commented 5 years ago

Can also do.

- name: Restart auditd
  shell: service auditd restart
  args:
    warn: no

Runs as:

RUNNING HANDLER [Ansible-RHEL7-CIS-Benchmarks : Restart auditd] ************************************
changed: [192.168.2.106]
HarryHarcourt commented 5 years ago

Hi Roman I have updated the latest master to version 1.1.36, by updating the handlers/main.yml in the way the Ansible Developers indicated it should be done