Files
TWS-Semaphore/ensure-patchmon-compliance.yml

19 lines
455 B
YAML

---
- name: Ensure compliance integration is enabled
hosts: all
become: true
tasks:
- name: Set compliance to true if currently false
ansible.builtin.replace:
path: /etc/patchmon/config.yml
regexp: '^(\s*compliance:\s*)false'
replace: '\1true'
backup: no
notify: Restart patchmon
handlers:
- name: Restart patchmon
ansible.builtin.service:
name: patchmon
state: restarted