From bf16845d2a1af93175834446708bdc9c50318c4e Mon Sep 17 00:00:00 2001 From: Radar231 Date: Sat, 6 May 2023 01:20:38 +0000 Subject: [PATCH] split updates for servers and workstations --- do_svrs_updates.sh | 18 ++++++++++++++++++ do_ws_updates.sh | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100755 do_svrs_updates.sh create mode 100755 do_ws_updates.sh diff --git a/do_svrs_updates.sh b/do_svrs_updates.sh new file mode 100755 index 0000000..deaaa93 --- /dev/null +++ b/do_svrs_updates.sh @@ -0,0 +1,18 @@ +#!/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/delfax.yml --limit servers updates.yml 2>&1 | tee -a ${logDir}/updates_svrs_${curDate}.log + diff --git a/do_ws_updates.sh b/do_ws_updates.sh new file mode 100755 index 0000000..92dcdd6 --- /dev/null +++ b/do_ws_updates.sh @@ -0,0 +1,18 @@ +#!/bin/bash +########################################################################### +# +# This is a helper script for the updates.yml ansible playbook. +# +# This script will apply updates to hosts in the 'workstations' inventory group +# +########################################################################### + +curDate=$(date +%Y%m%d) +devDir="$HOME/dev/ansidev" +logDir="$HOME/logs" + +mkdir -p $logDir +cd $devDir + +ansible-playbook -i inventory/delfax.yml --limit workstations updates.yml 2>&1 | tee -a ${logDir}/updates_ws_${curDate}.log +