diff --git a/crontab.txt b/crontab.txt index 63da5ac..eaac0fc 100644 --- a/crontab.txt +++ b/crontab.txt @@ -28,7 +28,7 @@ ANSIBLE_CONFIG=/home/justin/Ansible/ansible.cfg 0 5 * * * ansible-playbook /home/justin/Ansible/docker/update-docker-compose.yaml >> /home/justin/cron-logs/update-docker-compose.log 2>&1 30 5 * * * ansible-playbook /home/justin/Ansible/docker/restart-qtorrnt.yaml >> /home/justin/cron-logs/restart-qtorrnt.log 2>&1 0 6 * * * ansible-playbook /home/justin/Ansible/ubuntu/restart-beszel.yaml >> /home/justin/cron-logs/restart-beszel.log 2>&1 -#0 2 * * * ansible-playbook /home/justin/Ansible/ubuntu/update.yaml >> /home/justin/cron-logs/update.log 2>&1 -#0 7 * * * ansible-playbook /home/justin/Ansible/ubuntu/reboot.yaml >> /home/justin/cron-logs/reboot.log 2>&1 +0 2 * * * ansible-playbook /home/justin/Ansible/ubuntu/update.yaml >> /home/justin/cron-logs/update.log 2>&1 +0 7 * * * ansible-playbook /home/justin/Ansible/ubuntu/reboot.yaml >> /home/justin/cron-logs/reboot.log 2>&1 0 5 * * 2 ansible-playbook /home/justin/Ansible/ubuntu/maint-clean-logs-cache.yaml >> /home/justin/cron-logs/maint-clean-logs-cache.log 2>&1 0 0 1,15 * * ansible-playbook /home/justin/Ansible/ubuntu/fix-ssh-host-keys.yaml >> /home/justin/cron-logs/fix-ssh-host-keys.log 2>&1 diff --git a/patchman-remove.yaml b/patchman-remove.yaml new file mode 100644 index 0000000..2357ed3 --- /dev/null +++ b/patchman-remove.yaml @@ -0,0 +1,21 @@ +--- +# Removes patchman-client from every Ubuntu server: undoes patchman-client.yaml +# (roles/patchman_client). Leaves curl, jq and cron installed since other +# things use them. Hosts stay listed on the Patchman server until deleted there. +- name: Remove patchman-client + hosts: ubuntu_servers + become: true + tasks: + - name: Remove patchman-client package (if installed from a repo) + ansible.builtin.package: + name: patchman-client + state: absent + + - name: Remove patchman-client files + ansible.builtin.file: + path: "{{ item }}" + state: absent + loop: + - /etc/cron.d/patchman-client + - /usr/sbin/patchman-client + - /etc/patchman