Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (16 sloc) 0.51 kb
#!/usr/bin/python
import yaml # PyYAML version
import urlgrabber
import sys
if __name__ == "__main__":
hostname = None
try:
hostname = sys.argv[1]
except:
print "usage: cobbler-ext-nodes <hostname>"
if hostname is not None:
conf = open("/etc/cobbler/settings")
config = yaml.safe_load(conf.read());
conf.close()
url = "http://%s:%s/cblr/svc/op/puppet/hostname/%s" % (config["server"], config["http_port"], hostname)
print urlgrabber.urlread(url)
Jump to Line
Something went wrong with that request. Please try again.