From: Silvio Rhatto Date: Fri, 2 Jun 2017 18:49:08 +0000 (-0300) Subject: Provision: config file autodiscovery also matches fqdn X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=6019a6866d9b9f22d632a3edc9348c021d1956be;p=hydra.git Provision: config file autodiscovery also matches fqdn --- diff --git a/lib/hydra/provision b/lib/hydra/provision index 62e066c..850230b 100644 --- a/lib/hydra/provision +++ b/lib/hydra/provision @@ -2,6 +2,8 @@ # Load provision configuration function hydra_provision_config_load { + local domain="`facter domain`" + if [ ! -z "$1" ]; then if [ -f "$1" ]; then echo "Using configuration from file $1..." @@ -9,6 +11,9 @@ function hydra_provision_config_load { elif [ -f "$1.conf" ]; then echo "Using configuration from file $1.conf..." source "$1.conf" + elif [ -f "$1.$domain.conf" ]; then + echo "Using configuration from file $1.$domain.conf..." + source "$1.$domain.conf" elif [ -f "$HYDRA_FOLDER/config/provision/$1" ]; then echo "Using configuration from $HYDRA_FOLDER/config/provision/$1..." source "$HYDRA_FOLDER/config/provision/$1"