#!/bin/bash
# Ensures that all the pre state checks (checks before setup script) are verified by running the pre_state_check.yml file
set -euo pipefail

script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

export ZOOX_ANSIBLE_INVENTORY_TARGET=vehicle
export ANSIBLE_CONFIG="$script_dir/../ansible/ansible.cfg"

# Explicitly set ZOOX_WORKSPACE_ROOT to the repo's root.
ZOOX_WORKSPACE_ROOT="$script_dir/../.." ansible-playbook "$script_dir/../ansible/pre_state_check.yml"
