Compare commits
4
Commits
fa0bd81dd2
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f22821d168 | ||
|
|
7dcc71d88c | ||
|
|
622325f210 | ||
|
|
ef7047f6bc |
No files matched your search
@@ -27,8 +27,12 @@
|
||||
- /home/justin/docker/wavelog
|
||||
- /home/justin/docker/kometa
|
||||
- /home/justin/docker/tautulli
|
||||
docker.ki5bhv.com:
|
||||
- /home/justin/Docker/code-server # capital D on this host
|
||||
- /home/justin/docker/gaseous
|
||||
docker.ki5bhv.com: # capital D on this host
|
||||
- /home/justin/Docker/code-server
|
||||
- /home/justin/Docker/audio-book
|
||||
# Not listed on purpose: windows and minecraft are kept stopped
|
||||
# ("created"), and an update would start them.
|
||||
proxy-server.ki5bhv.com:
|
||||
- /home/justin/docker/nginx-proxy
|
||||
stacks: "{{ stacks_by_host[inventory_hostname] | default([]) }}"
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
Reference in new issue
Block a user