mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 13:46:59 +01:00
Deploy ingress, lego and dashboard
This commit is contained in:
parent
bf83e675f2
commit
f468fd3e34
43 changed files with 1321 additions and 142 deletions
35
roles/ingress/templates/notify.sh.j2
Normal file
35
roles/ingress/templates/notify.sh.j2
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#!/bin/bash
|
||||
|
||||
# for ANY state transition.
|
||||
# "notify" script is called AFTER the
|
||||
# notify_* script(s) and is executed
|
||||
# with 3 arguments provided by keepalived
|
||||
# (ie don't include parameters in the notify line).
|
||||
# arguments
|
||||
# $1 = "GROUP"|"INSTANCE"
|
||||
# $2 = name of group or instance
|
||||
# $3 = target state of transition
|
||||
# ("MASTER"|"BACKUP"|"FAULT")
|
||||
|
||||
TYPE=$1
|
||||
NAME=$2
|
||||
STATE=$3
|
||||
|
||||
case $STATE in
|
||||
"MASTER") echo "I'm the MASTER! Whup whup." > /proc/1/fd/1
|
||||
echo "Here is the master"
|
||||
# this put the public ip on the master using the scaleway api
|
||||
/mnt/scaleway-ipmove.py {{ scaleway_token }} {{ scaleway_servername1 }} {{ scaleway_servername2 }} {{ scaleway_ipaddr }} {{ scaleway_reverse_ipaddr }} {{ scaleway_orga }}
|
||||
exit 0
|
||||
;;
|
||||
"BACKUP") echo "Ok, i'm just a backup, great." > /proc/1/fd/1
|
||||
echo "Here is the backup"
|
||||
exit 0
|
||||
;;
|
||||
"FAULT") echo "Fault, what ?" > /proc/1/fd/1
|
||||
exit 0
|
||||
;;
|
||||
*) echo "Unknown state" > /proc/1/fd/1
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
Loading…
Add table
Add a link
Reference in a new issue