summaryrefslogtreecommitdiffstats
path: root/puppet-host-package
diff options
context:
space:
mode:
Diffstat (limited to 'puppet-host-package')
-rwxr-xr-xpuppet-host-package12
1 files changed, 5 insertions, 7 deletions
diff --git a/puppet-host-package b/puppet-host-package
index 1914dc3..101b64c 100755
--- a/puppet-host-package
+++ b/puppet-host-package
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-"""Create a host package for bootstrapping a puppet client."""
+"""Create a host package for bootstrapping a puppet host."""
import os
import glob
@@ -64,17 +64,15 @@ if not os.path.isfile(opts.template):
raise SystemExit('Template file (%s) does not exist' % opts.template)
for hostname in args:
- client = puppethost.PuppetHost(hostname, opts.__dict__)
+ host = puppethost.PuppetHost(hostname, opts.__dict__)
- cert = client.files['cert']
-
- if not os.path.exists(cert) or opts.force_cert:
- try: client.gencert()
+ if not os.path.exists(host.files['cert']) or opts.force_cert:
+ try: host.gencert()
except puppethost.PuppetHostError, error:
print error
continue
- try: client.package()
+ try: host.package()
except Exception, error:
print error
continue