Fix pre-commit hooks and move directories
roles/ and inventory/ are now in playbooks/ also fixed issues reported by ansible-lint
This commit is contained in:
parent
dc398ddb6e
commit
4104057771
123 changed files with 91 additions and 39 deletions
playbooks/roles/teamspeak_fallback/templates
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
while true
|
||||
do
|
||||
if nc -z -w 3 "{{ teamspeak_fallback_check_server }}" "{{ teamspeak_fallback_check_port }}"
|
||||
then
|
||||
if docker compose ps --services | grep teamspeak >/dev/null; then
|
||||
echo "Stopping Server"
|
||||
docker compose down teamspeak
|
||||
fi
|
||||
else
|
||||
if ! docker compose ps --services | grep teamspeak >/dev/null; then
|
||||
echo "Starting Server"
|
||||
docker compose up -d --pull=always teamspeak
|
||||
fi
|
||||
fi
|
||||
sleep 2
|
||||
done
|
|
@ -0,0 +1,13 @@
|
|||
[Service]
|
||||
[Unit]
|
||||
Description=Teamspeak Fallback Starter
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart={{ service_path }}/conditional-start.sh
|
||||
WorkingDirectory={{ service_path }}
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Add table
Add a link
Reference in a new issue