292. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 4/18/2019 5:55:27 PM Eastern Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

292.1 Files compared

# Location File Last Modified
1 MCCF_EDI_TAS_TASCore v2.0_Build_10.zip\MCCF_EDI_TAS_DevOps\mccf_devops\scripts\shell installSiteminder.sh Wed Apr 3 02:27:18 2019 UTC
2 MCCF_EDI_TAS_TASCore v2.0_Build_10.zip\MCCF_EDI_TAS_DevOps\mccf_devops\scripts\shell installSiteminder.sh Tue Apr 16 15:27:28 2019 UTC

292.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 336
Changed 1 2
Inserted 0 0
Removed 0 0

292.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

292.4 Active regular expressions

No regular expressions were active.

292.5 Comparison detail

  1   #!/bin/bas h
  2   #
  3   #set -x
  4  
  5   scriptname =${0}
  6   scriptBase ="$( cd "$ ( dirname  "$scriptna me" )";  p wd)"
  7   VAULTPASS_ PATH="~/.v ault_pass"
  8   REPO_FILE= "siteminde r-requirem ents.yml"
  9   ROOT_DIR=" $( cd ../. .;  pwd)"
  10   TIMESTAMP= `date "+%Y %m%d_%H%M% S"`
  11   LOG_DIR="$ {ROOT_DIR} /logs"
  12   LOGFILE="$ {LOG_DIR}/ siteminder Install_${ TIMESTAMP} .log"
  13   HOSTS=webs erver
  14   playbooks= ("install- siteminder .yml")
  15  
  16   function u sage() {
  17     echo "us age: $scri ptname -e  ENV"
  18     echo "       where  ENV = MAG_ ALL | MAG_ CI | MAG_C IT | MAG_D EV | MAG_S QA | MAG_U AT | local "
  19     echo "op tional arg uments: "
  20     echo "   -u|--user  Bitbucket  Username"
  21     echo "   -p|--pass  Bitbucket  Password"
  22     echo "   -l|--logfi le logfile "
  23     echo "   -c|--nocol or (for no color)]"
  24     exit 1
  25   }
  26  
  27   # ReadArgs  reads the  command l ine argume nts passed  to it
  28   # and popu lates shel l variable s accordin gly
  29   ReadArgs()  {
  30     LOGTXT " Entered Re adArg"
  31     while [[  $# -gt 0  ]] ; do
  32       key="$ 1"
  33       case $ key in
  34         -c |  --nocolor  )
  35               UseColor= No
  36               CLEAR=""
  37               COL60=""
  38               NORMAL=""
  39               WHITE=""
  40               GREEN=""
  41               RED=""
  42               YELLOW=""
  43               BLUE=""
  44               shift # p ast argume nt
  45               LOGTXT "P rocessing  without co lor"
  46               ;;
  47         -l |  --logfile  )
  48               if [[ $#  -ge 2 ]] ;  then
  49                 LOGFILE ="$2"
  50               else
  51                 DEBUG " $1 argumen t requires  another a rgument af ter it"
  52                 LOGTXT  "Error in  $1 argumen t (no next  argument  provided)"
  53                 exit 9
  54               fi
  55               LOGTXT "U sing LogFi le $LOGFIL E instead"
  56               # DEBUG   "Log outpu t redirect ed to $LOG FILE"
  57               shift # p ast argume nt
  58               shift # p ast logfil e entry
  59              ;;
  60         -u |  --user )
  61               if [[ $#  -ge 2 ]] ;  then
  62                 USERNAM E="$2"
  63               else
  64                 DEBUG " argument $ 1 requires  another a rgument af ter it"
  65                 LOGTXT  "Error in  $1 argumen t (no next  argument  provided)"
  66                 exit 9
  67               fi
  68               LOGTXT "U SERNAME: $ USERNAME "
  69               # DEBUG   "USERNAME:  $USERNAME  "
  70               shift # p ast argume nt
  71               shift # p ast fqdn e ntry
  72               ;;
  73         -p |  --pass )
  74               if [[ $#  -ge 2 ]] ;  then
  75                 PASSWD= "$2"
  76               else
  77                 DEBUG " argument $ 1 requires  another a rgument af ter it"
  78                 LOGTXT  "Error in  $1 argumen t (no next  argument  provided)"
  79                 exit 9
  80               fi
  81               LOGTXT "U sing suppl ied passwo rd "
  82               # DEBUG   "Using sup plied pass word $PASS WD "
  83               shift # p ast argume nt
  84               shift # p ast fqdn e ntry
  85               ;;
  86         -s |  --skiprol es )
  87               skiproles ="true"
  88               LOGTXT "s kiproles:  $skiproles , not coll ecting rol es from mc cf BB repo s"
  89               DEBUG "sk iproles: $ skiproles,  not colle cting role s from mcc f BB repos "
  90               shift # p ast argume nt
  91               ;;
  92         -e |  --env )
  93               if [[ $#  -ge 2 ]] ;  then
  94                 ENV="$2 "
  95               else
  96                 DEBUG " argument $ 1 requires  another a rgument af ter it"
  97                 LOGTXT  "Error in  $1 argumen t (no next  argument  provided)"
  98                 exit 9
  99               fi
  100               LOGTXT "E nvironment : $ENV"
  101               # DEBUG   "Environme nt $ENV"
  102               shift # p ast argume nt
  103               shift # p ast fqdn e ntry
  104               ;;
  105         * )   DEBUG "$1  is not a  valid argu ment"
  106               LOGTXT "$ 1 is not a  valid arg ument"
  107               exit 9
  108               ;;
  109       esac
  110     done
  111     LOGTXT " Exited Rea dArgs"
  112   }
  113  
  114   #source th e commonfu nctions
  115   . "$script Base/commo nfunctions .sh"
  116  
  117   ReadArgs $ *
  118  
  119   DEBUG "scr iptBase: $ {scriptBas e}"
  120   DEBUG "ROO T_DIR: ${R OOT_DIR}"
  121   DEBUG "log ging to: $ {LOGFILE}"
  122   DEBUG "vau lt pass pa th: ${VAUL TPASS_PATH }"
  123  
  124   DEBUG "Che ck if log  directory  exists and  if not, c reate it"
  125   if [[ ! -d  ${LOG_DIR } ]]; then
  126     mkdir -Z  ${LOG_DIR }
  127   fi
  128  
  129   DEBUG "Ver ify ENV wa s provided "
  130   if [[ -z " ${ENV}" ]] ; then
  131     DEBUG "E NV require d"
  132     usage
  133   else
  134     DEBUG "o perating o n ENV ${EN V}"
  135   fi
  136  
  137   ansibleExt raVars="va r_hosts=${ HOSTS}"
  138  
  139   if is_true  "$skiprol es" ; then
  140     DEBUG "s kiproles s pecified,  no need to  install r oles"
  141   else
  142     DEBUG "I nstall rol es from ${ REPO_FILE} "
  143     getMCCFR oles ${REP O_FILE}
  144   fi
  145  
  146   DEBUG "Sta rting to p rocess pla ybooks on  ${HOSTS} f or $ENV en vironment  with vars:  ${ansible ExtraVars} "
  147  
  148   for item i n "${playb ooks[@]}"
  149   do
  150     playBook =${item}
  151     LOGTXT " execute pl aybook ${p layBook} f or ${ENV}  ${ansibleE xtraVars}"
  152     runAnsib lePlaybook  ${playBoo k}
  153     rtnCode= $?
  154     DEBUG "r tnCode fro m running  ansible pl aybook is  ${rtnCode} "
  155     if [[ $r tnCode -eq  0 ]]
  156     then
  157       DEBUG  "${playBoo k} complet ed success fully"
  158       LOGTXT  "${playBo ok} comple ted succes sfully for  ${ENV} on  ${HOSTS}"
  159     else
  160       DEBUG  "${playBoo k} failed:  returned:  ${rtnCode }"
  161       LOGTXT  "${playBo ok} failed : returned : ${rtnCod e}"
  162     fi
  163     exit $rt nCode
  164   done
  165  
  166   # CONTACT  INFO
  167   CONTACT="L ee Benhart PII  or  DNS . URL "
  168  
  169   exit