test.sh #1

  • //
  • guest/
  • russell_jackson/
  • ansible-sdp/
  • test.sh
  • View
  • Commits
  • Open Download .zip Download (334 B)
#!/bin/bash
export SERVER=${1:-Undefined}
if [[ $SERVER == Undefined ]]; then
   echo "Server parameter not supplied."
   echo "You must supply the server or group name as a parameter to this script."
   exit 1
fi
ansible-playbook main-playbook.yml --extra-vars '{"run_sdp_tests":true}'  --vault-password-file password.txt --limit $1
# Change User Description Committed
#1 32870 Russell C. Jackson (Rusty) ansible-sdp: add test.sh harness runner + manage_etc_hosts for test hosts

test.sh / tasks/test.yml / main-playbook (run_sdp_tests flag): run the SDP
functional test harness (/p4/sdp/test/sdp_test_harness.sh) on a target via
ansible and report pass/fail, matching the ping/install/monitor helper pattern.

manage_etc_hosts (default false; true in p4-cache-test host_vars): map the SDP
server DNS names (perforce_dnsname/standby = P4MASTERPORT) to this host in
/etc/hosts so master-targeting scripts (rotate_journal, daily_checkpoint,
p4login_master) resolve on test boxes that lack real DNS.