Add additional items to base role

Backups, GRUB configuration, and IPMI configuration.
This commit is contained in:
2023-09-01 15:42:25 -04:00
parent c96ad603b0
commit 6903627150
4 changed files with 86 additions and 0 deletions

View File

@ -0,0 +1,15 @@
#!/bin/bash
# Backup the PVC Zookeeper database
# {{ ansible_managed }}
set -o errexit
BACKUP_DIR="/srv/backups/"
BACKUP_FILENAME_BASE="pvc-zookeeper-backup"
DATE="$( date +%Y%m%d )"
BACKUP_FILENAME="${BACKUP_DIR}/${BACKUP_FILENAME_BASE}.${DATE}.json"
pvc -c local task backup > ${BACKUP_FILENAME}
xz ${BACKUP_FILENAME}
find ${BACKUP_DIR} -type f -name "${BACKUP_FILENAME_BASE}*" -mtime +7 -exec rm {} \;