aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-06-02 15:49:08 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-06-02 15:49:08 -0300
commit6019a6866d9b9f22d632a3edc9348c021d1956be (patch)
tree165c8cf6d4d065edf49ff99543a6eee312904940 /lib
parent6aa8fc1e1cce787d40e01026245d9cb276e93f17 (diff)
downloadhydra-6019a6866d9b9f22d632a3edc9348c021d1956be.tar.gz
hydra-6019a6866d9b9f22d632a3edc9348c021d1956be.tar.bz2
Provision: config file autodiscovery also matches fqdn
Diffstat (limited to 'lib')
-rw-r--r--lib/hydra/provision5
1 files changed, 5 insertions, 0 deletions
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"