Add Docker file and generate wrapper

This commit is contained in:
Heath Seals 2019-08-23 13:33:03 -05:00 committed by suckatrash
parent e1c051df54
commit 854daa0d46
No known key found for this signature in database
GPG key ID: 3857A763831B0756
3 changed files with 31 additions and 0 deletions

17
generate.py Executable file
View file

@ -0,0 +1,17 @@
#!/usr/bin/env python3
import sys
import subprocess
if len(sys.argv) == 1:
puppetdb = 'localhost'
elif len(sys.argv) == 2:
puppetdb = sys.argv[1]
else:
sys.exit("Expected 1 or 0 arguments. Got {}.".format(len(sys.argv) - 1))
# Generate the report
subprocess.check_call(
["infinitory", "--host", "{}".format(puppetdb),
"--output", "/srv/infinitory/output"],
timeout=120)