Compare commits

..
2 Commits
Author SHA1 Message Date
JustinandClaude Opus 5.5 622325f210 Add playbook to remove PatchMon agent from Windows hosts
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-22 22:30:18 -06:00
JustinandClaude Opus 5.5 ef7047f6bc Add playbook to remove PatchMon agent (patch server retired)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-22 22:27:15 -06:00
2 changed files with 53 additions and 0 deletions

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
---
# Remove the PatchMon agent (server patch.ki5bhv.com / 192.168.1.8 was retired).
- name: Remove PatchMon agent
hosts: linux
become: true
tasks:
- name: Check for PatchMon unit
ansible.builtin.stat:
path: /etc/systemd/system/patchmon-agent.service
register: patchmon_unit
- name: Stop and disable patchmon-agent
ansible.builtin.systemd_service:
name: patchmon-agent
state: stopped
enabled: false
when: patchmon_unit.stat.exists
- name: Find PatchMon cron entries
ansible.builtin.find:
paths: /etc/cron.d
patterns: "patchmon*"
register: patchmon_cron
- name: Remove PatchMon files
ansible.builtin.file:
path: "{{ item }}"
state: absent
loop: "{{ ['/etc/systemd/system/patchmon-agent.service', '/usr/local/bin/patchmon-agent', '/etc/patchmon']
+ (patchmon_cron.files | map(attribute='path') | list) }}"
register: patchmon_removed
- name: Reload systemd
ansible.builtin.systemd_service:
daemon_reload: true
when: patchmon_removed is changed
+17
View File
@@ -0,0 +1,17 @@
---
# Remove the PatchMon agent (server patch.ki5bhv.com / 192.168.1.8 was retired).
- name: Remove PatchMon agent (Windows)
hosts: windows
tasks:
- name: Stop and delete PatchMonAgent service
ansible.windows.win_service:
name: PatchMonAgent
state: absent
- name: Remove PatchMon folders
ansible.windows.win_file:
path: "{{ item }}"
state: absent
loop:
- C:\Program Files\PatchMon
- C:\ProgramData\PatchMon