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 {} \;

View File

@ -0,0 +1,10 @@
# GRUB configuration
# {{ ansible_managed }}
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="{{ grub_cmdline_default }}"
GRUB_CMDLINE_LINUX=""
GRUB_TERMINAL_INPUT="console serial"
GRUB_TERMINAL_OUTPUT="gfxterm serial"
GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200"

View File

@ -0,0 +1,5 @@
iface ipmi inet manual
pre-up ipmitool lan set 1 ipsrc static
pre-up ipmitool lan set 1 ipaddr {{ ipmi['hosts'][ansible_hostname]['address'] }}
pre-up ipmitool lan set 1 netmask {{ ipmi['hosts'][ansible_hostname]['netmask'] }}
pre-up ipmitool lan set 1 defgw ipaddr {{ ipmi['hosts'][ansible_hostname]['gateway'] }}