#!/bin/bash
# Maintainer: Martin Weise <martin.weise@tuwien.ac.at>
# Short:      Test the infrastructure

echo -e "SETUP [Start automated tests] **************************************************"

# Start the Ansible automated debug
ansible-playbook ./test.yml

status=$?
if [ $status -eq 0 ]; then
  echo -e "SETUP [Done] *******************************************************************"
  echo -e "\e[92mok: [localhost]\e[39m\n"
  exit 0
else
  echo -e "SETUP [Done] *******************************************************************"
  echo -e "\e[91mfailed: playbook returned non-zero exit code\e[39m"
  exit 1
fi