diff options
author | Todd Zullinger <tmz@pobox.com> | 2008-11-26 01:40:20 -0500 |
---|---|---|
committer | Todd Zullinger <tmz@pobox.com> | 2008-11-26 09:46:09 -0500 |
commit | 1ecbc6b8a4bd1a37bd808f9f9830e7884629ca14 (patch) | |
tree | b8b9a97b0b654fd4623fac973e2b0318e61b2756 | |
parent | 8a839d63a8efdb3bc9f173c304f444d097ba031c (diff) | |
download | puppet-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-x | puppethost.py | 4 |
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 |