Compare commits

...

2 Commits

Author SHA1 Message Date
1952f72c89 Add a check for the last ansible run on a given machine 2021-11-25 16:41:17 -06:00
5b12eb5af2 Add a cleanup task to touch a file upon completion of site.yml
This playbook *should* assure that we have a file we can use for checking when the last full play was. It being in a playbook at the tail end of site.yml is paramount, since site.yml dying will cause alarms to be set off.
2021-11-25 16:19:01 -06:00
3 changed files with 16 additions and 0 deletions

12
playbooks/cleanup.yml Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
---
# Preambulatory system configuration
- hosts: all
tasks:
- name: collect service facts
service_facts:
tags: [ always ]
- name: touch ansible timestamp file
file: path=/var/lib/ansible-last-run state=touch mode='0644'
changed_when: no

View File

@ -37,6 +37,8 @@
command: check_by_ssh!/usr/lib/nagios/plugins/check_disk -M -u GB -X nfs -X tracefs -X cgroup -X tmpfs -X overlay -X shm -w 15% -c 10% -W 15% -K 10% -A -I '^/run/' -I '^udev$' -I '^/var/lib/kubelet/'
- name: DNS Resolution
command: check_by_ssh!/usr/lib/nagios/plugins/check_etc_resolv
- name: Last Ansible Play
command: check_by_ssh!/usr/local/bin/monitoring-scripts/check_file_age /var/lib/ansible-last-run -w 90000 -c 100000
- name: Memory Usage
command: check_by_ssh!/usr/lib/nagios/plugins/check_memory -w 20% -c 10%
- name: Package Updates

View File

@ -34,3 +34,5 @@
# Housekeeping tags for one-off tasks
- import_playbook: playbooks/tags_docker-prune.yml
- import_playbook: playbooks/tags_autoreboot.yml
# Last little bit of cleanup
- import_playbook: playbooks/cleanup.yml