---
- yum: name={{ item }} state=installed
  with_items:
  - mod_security
  - mod_security_crs
  notify: verify config and restart httpd

- lineinfile: dest=/etc/httpd/conf.d/mod_security.conf regexp='^(\s*)SecRuleEngine ' line='\1SecRuleEngine {{ 'DetectionOnly' if mod_sec_detection_only else 'On' }}'
  notify: verify config and restart httpd
  when: mod_sec_detection_only is True



---
- yum: name={{ item }} state=installed
  with_items:
  - mod_security
  - mod_security_crs
  notify: verify config and restart httpd
  name: Install mod_security packages

- lineinfile: dest=/etc/httpd/conf.d/mod_security.conf regexp='^(\s*)SecRuleEngine ' line='\1SecRuleEngine {{ 'DetectionOnly' if mod_sec_detection_only else 'On' }}'
  notify: verify config and restart httpd
  when: mod_sec_detection_only is True
  name: Deploy modsecurity in apache

Add name for the mod_sec tasks
Add name for the mod_sec tasks
