Files
fedora-infra_ansible/roles/batcave/files/ansible-hosts-updates-uptime.cron
2025-08-12 17:20:21 -04:00

16 lines
592 B
Bash

#! /bin/sh
uuc="/usr/local/bin/updates-uptime-cmd.py"
# Make it work in cron...
source /root/sshagent >>/dev/null
export ANSIBLE_HOST_KEY_CHECKING=False
# This runs the playbook generate-updates-uptimes-per-host-file.yml
# which needs privs. to connect to "all" our hosts.
# Don't output anything, because it's a lot of ansible output and it's
# mostly fine if nothing happens (we just lose history).
# Timeout is set for 1h but it should be much faster (< 5m).
timeout 1h $uuc update-daily 2> /dev/null > /dev/null || true
$uuc history-keep 2> /dev/null > /dev/null || true