mirror of
https://github.com/puppetlabs/infinitory.git
synced 2026-01-26 02:08:41 -05:00
(DIO-834) Refactor to use pdb queries, output to GCS Bucket
This commit is contained in:
parent
854daa0d46
commit
fd1ad61fce
9 changed files with 107 additions and 60 deletions
15
generate.py
15
generate.py
|
|
@ -3,15 +3,12 @@
|
|||
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))
|
||||
puppetdb = sys.argv[1]
|
||||
token = sys.argv[2]
|
||||
bucket = sys.argv[3]
|
||||
|
||||
# Generate the report
|
||||
subprocess.check_call(
|
||||
["infinitory", "--host", "{}".format(puppetdb),
|
||||
"--output", "/srv/infinitory/output"],
|
||||
timeout=120)
|
||||
["infinitory", "--host", puppetdb, "--token", token, "--bucket", bucket,
|
||||
"--output", "/output/infinitory"],
|
||||
timeout=300)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue