playbook_del-updates/do_svrs_updates.sh

19 lines
551 B
Bash
Executable File

#!/bin/bash
###########################################################################
#
# This is a helper script for the updates.yml ansible playbook.
#
# This script will apply updates to hosts in the 'servers' inventory group
#
###########################################################################
curDate=$(date +%Y%m%d)
devDir="$HOME/dev/ansidev"
logDir="$HOME/logs"
mkdir -p $logDir
cd $devDir
ansible-playbook -i inventory/prod.yml --limit servers,k8s,vms,ctrs,remote updates.yml 2>&1 | tee -a ${logDir}/updates_svrs_${curDate}.log