summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTodd Zullinger <tmz@pobox.com>2008-11-25 21:35:52 -0500
committerTodd Zullinger <tmz@pobox.com>2008-11-25 21:35:52 -0500
commitc8cc419f5f9a51f3bafe7353e76d157aeabe9b93 (patch)
tree4a8d2447dbb61b995e52129fd5d16db9a60fd299
parent8f5d289ecbaa8ee9f251c98813d9f00b438c1f82 (diff)
downloadpuppet-host-package-c8cc419f5f9a51f3bafe7353e76d157aeabe9b93.tar.gz
puppet-host-package-c8cc419f5f9a51f3bafe7353e76d157aeabe9b93.tar.xz
puppet-host-package-c8cc419f5f9a51f3bafe7353e76d157aeabe9b93.zip
Replace ssldir in template after options are read
This ensures that the template will use the provided ssldir option.
-rwxr-xr-xpuppethost.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/puppethost.py b/puppethost.py
index 79a28f9..25f16cf 100755
--- a/puppethost.py
+++ b/puppethost.py
@@ -22,7 +22,7 @@ defaults = {
'release': '1',
'rpmdir': os.path.abspath(os.curdir),
'ssldir': ssldir,
- 'template': '%s/template.spec' % ssldir,
+ 'template': '%(ssldir)s/template.spec',
}
del ssldir
@@ -259,6 +259,7 @@ def _main():
if not opts.destssldir:
opts.destssldir = opts.ssldir
+ opts.template = opts.template % opts.__dict__
if not os.path.isfile(opts.template):
raise SystemExit('Template file (%s) does not exist' % opts.template)