20 lines
1006 B
Bash
Executable File
20 lines
1006 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
ansible-playbook -i localhost, playbooks/deploy-eom.yml --syntax-check
|
|
ansible-playbook -i localhost, playbooks/deploy-friend.yml --syntax-check
|
|
ansible-playbook -i localhost, tests/test.yml
|
|
|
|
# These must fail at the preflight assertion, before trying to access a cluster.
|
|
if ansible-playbook -i localhost, playbooks/deploy-friend.yml > /tmp/owncast-friend-missing.log 2>&1; then
|
|
echo 'Friend deployment accepted missing settings' >&2
|
|
exit 1
|
|
fi
|
|
grep -q 'Supply friend_owncast_hostname and friend_owncast_cluster_issuer' /tmp/owncast-friend-missing.log
|
|
if ansible-playbook -i localhost, playbooks/deploy-friend.yml \
|
|
-e friend_owncast_hostname=owncast.eom.dev \
|
|
-e friend_owncast_cluster_issuer=fixture > /tmp/owncast-friend-collision.log 2>&1; then
|
|
echo 'Friend deployment accepted the existing hostname' >&2
|
|
exit 1
|
|
fi
|
|
grep -q 'Supply friend_owncast_hostname and friend_owncast_cluster_issuer' /tmp/owncast-friend-collision.log
|
|
echo 'Owncast offline checks passed' |