summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2014-07-29 11:09:02 +1000
committerMartin Schwenke <martin@meltin.net>2014-08-12 11:17:20 +1000
commitbb67c3488db65d74bd1f7d7c1961de06299370c1 (patch)
treed1eec2557e9c0951eaffe46f6ad83bbcc2f99817
parent2808edf98da04f88b6db929ea21df42994aca323 (diff)
downloadautocluster-bb67c3488db65d74bd1f7d7c1961de06299370c1.tar.gz
autocluster-bb67c3488db65d74bd1f7d7c1961de06299370c1.tar.xz
autocluster-bb67c3488db65d74bd1f7d7c1961de06299370c1.zip
New configuration variable AD_DNS_FORWARDER
When creating a cluster with an addition AD server node, the DNS forwarder on the AD node needs to be different to the DNS server for the cluster nodes. Signed-off-by: Martin Schwenke <martin@meltin.net>
-rwxr-xr-xbase/all/root/scripts/setup_node_ad.sh2
-rw-r--r--config.d/57node_ad.defconf11
2 files changed, 12 insertions, 1 deletions
diff --git a/base/all/root/scripts/setup_node_ad.sh b/base/all/root/scripts/setup_node_ad.sh
index 7714e8c..0fbdf62 100755
--- a/base/all/root/scripts/setup_node_ad.sh
+++ b/base/all/root/scripts/setup_node_ad.sh
@@ -21,7 +21,7 @@ samba-tool domain provision \
sed -i -e '/server services/a\
allow dns updates = True\
nsupdate command = nsupdate\
- dns forwarder = @@NAMESERVER@@\
+ dns forwarder = @@AD_DNS_FORWARDER@@\
dns recursive queries = Yes' /etc/samba/smb.conf
# Add users/groups
diff --git a/config.d/57node_ad.defconf b/config.d/57node_ad.defconf
index 4e69829..607c970 100644
--- a/config.d/57node_ad.defconf
+++ b/config.d/57node_ad.defconf
@@ -9,6 +9,17 @@ defconf AD_FUNCTION_LEVEL "2008" \
defconf AD_NETBIOS_NAME "samba4" \
"<string>" "NetBIOS name to use for AD server"
+defconf AD_DNS_FORWARDER "@uto" \
+ "<ip>" "DNS server for AD server to forward to"
+
+ad_post_config_hook ()
+{
+ if [ "$AD_DNS_FORWARDER" = "@uto" ] ; then
+ AD_DNS_FORWARDER="$KVMHOST"
+ fi
+}
+register_hook post_config_hooks ad_post_config_hook
+
node_name_format_ad ()
{
local cluster="$1"