summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTodd Zullinger <tmz@pobox.com>2008-11-26 01:40:20 -0500
committerTodd Zullinger <tmz@pobox.com>2008-11-26 09:46:09 -0500
commit1ecbc6b8a4bd1a37bd808f9f9830e7884629ca14 (patch)
treeb8b9a97b0b654fd4623fac973e2b0318e61b2756
parent8a839d63a8efdb3bc9f173c304f444d097ba031c (diff)
downloadpuppet-host-package-1ecbc6b8a4bd1a37bd808f9f9830e7884629ca14.tar.gz
puppet-host-package-1ecbc6b8a4bd1a37bd808f9f9830e7884629ca14.tar.xz
puppet-host-package-1ecbc6b8a4bd1a37bd808f9f9830e7884629ca14.zip
Fix domain when hostname is not fully qualified
-rwxr-xr-xpuppethost.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/puppethost.py b/puppethost.py
index 1d83f7e..3398584 100755
--- a/puppethost.py
+++ b/puppethost.py
@@ -46,8 +46,8 @@ class PuppetHost(object):
if not hostname:
raise PuppetHostError('A hostname must be provided')
- if '.' not in hostname and domain:
- hostname = '.'.join([hostname, domain])
+ if '.' not in hostname and opts['domain']:
+ hostname = '.'.join([hostname, opts['domain']])
hostname = hostname.lower()
self.hostname = hostname