diff --git a/scripts/onehost_create_all b/scripts/onehost_create_all index a9943bc..af8a690 100755 --- a/scripts/onehost_create_all +++ b/scripts/onehost_create_all @@ -160,6 +160,18 @@ fi HAPY_HA=$(CreoleGet activer_one_ha "non") +master=1 +if [[ ${HAPY_HA} == "oui" ]]; then + idx=$(CreoleGet one_ha_server_index) + if [[ ${idx} != "0" ]]; then + EchoBleu "Mode HA: (on) Index : [${idx}]" + echo -e "\t$(basename ${0}) doit ĂȘtre lancĂ© uniquement sur le leader (index 0)" + exit 0 + else + master=0 + fi +fi + declare -a HAPY_SLV=('') ONEUSER=$(CreoleGet virt_user) HAPY_SLV=$(echo $(CreoleGet one_nodes) | sed -e "s/\n/ /g") @@ -175,14 +187,7 @@ then exit 1 fi -master=1 -if [ "$(CreoleGet activer_one_ha)" = "oui" ]; then - if [ "$(CreoleGet one_ha_server_index)" != "0" ]; then - exit 0 - else - master=0 - fi -fi + for host in ${HAPY_SLV}; do echo -e "\n" EchoOrange "Traitement du noeud ${host}"