diff --git a/ensure-patchmon-compliance b/ensure-patchmon-compliance new file mode 100644 index 0000000..0cda443 --- /dev/null +++ b/ensure-patchmon-compliance @@ -0,0 +1,19 @@ +--- +- 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: true + notify: Restart patchmon + + handlers: + - name: Restart patchmon + ansible.builtin.service: + name: patchmon + state: restarted \ No newline at end of file