From 802b9f1f1f10e5474bc477829fc8499288acc7a5 Mon Sep 17 00:00:00 2001 From: JJ Asghar Date: Thu, 26 Jul 2012 10:36:34 -0500 Subject: [PATCH] created bb_generic_logs, check_yum_updates, and puppet.repo --- bb_generic_logs_pull.sh | 30 ++++++++++++++++++++++++++++++ check_yum_updates.sh | 10 ++++++++++ lazy.sh | 6 ++---- puppet.repo | 6 ++++++ 4 files changed, 48 insertions(+), 4 deletions(-) create mode 100755 bb_generic_logs_pull.sh create mode 100755 check_yum_updates.sh create mode 100644 puppet.repo diff --git a/bb_generic_logs_pull.sh b/bb_generic_logs_pull.sh new file mode 100755 index 0000000..08ee5f0 --- /dev/null +++ b/bb_generic_logs_pull.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +FULLFILE=/usr/local/blackboard/apps/oracle-client/network/admin/tnsnames.ora +FILE=tnsnames.ora + +USER=asgharje +DATE=`date +%F` +TOMCAT_DATE=`date +%Y%m%d` +BB_DATE=`date +%Y-%m-%d` + +# +# Create the directory +# +mkdir $DATE +cd $DATE + +# +# Pull the files down +# +for i in "spider.its.utexas.edu" "maeve.its.utexas.edu" "nancy.its.utexas.edu" "tristran.its.utexas.edu" "rosie.its.utexas.edu" +do + echo "" + echo "Now pulling from $i" + echo "" + scp -C $USER@$i:$FULLFILE $DATE.$i.$FILE + echo "" + echo "Done with $i" + echo "" +done + diff --git a/check_yum_updates.sh b/check_yum_updates.sh new file mode 100755 index 0000000..54240b1 --- /dev/null +++ b/check_yum_updates.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +DATE=`date +%F` +HOSTNAME=`hostname -s` +EMAIL=jjasghar@utexas.edu + +yum check-update > /tmp/$DATE.check_update.txt +mail -s "Weekly $HOSTNAME check-update" $EMAIL < /tmp/$DATE.check_update.txt +rm /tmp/$DATE.check_update.txt + diff --git a/lazy.sh b/lazy.sh index f140270..9d447c9 100755 --- a/lazy.sh +++ b/lazy.sh @@ -1,5 +1,3 @@ #!/bin/bash -for i in `cat prod_machines.txt` ; do scp linux_audit.sh $i://tmp/ ; done -for i in `cat prod_machines.txt` ; do ssh $i /tmp/linux_audit.sh ; done -./pull_linux_audit.sh -ls -ltra *.txt +for i in `cat prod_machines.txt` ; do scp puppet.repo $i://tmp/ ; done + diff --git a/puppet.repo b/puppet.repo new file mode 100644 index 0000000..1e34e5d --- /dev/null +++ b/puppet.repo @@ -0,0 +1,6 @@ +[puppetlabs] +name=Puppet Labs Packages +baseurl=http://yum.puppetlabs.com/el/$releasever/products/$basearch/ +enabled=1 +gpgcheck=1 +gpgkey=http://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs