Skip to content

Commit

Permalink
Merge pull request #102 from GoSecure/feature-log-packer-config
Browse files Browse the repository at this point in the history
Dump packer temporary config file with -d
  • Loading branch information
obilodeau authored Sep 18, 2018
2 parents 12a30c3 + b47cc6d commit 5fdaa29
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion malboxes/malboxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,16 @@ def prepare_packer_template(config, template_name):

# write to temporary file
f = create_cachefd('{}.json'.format(template_name))
f.write(template.render(config)) # pylint: disable=no-member
packer_config = template.render(config) # pylint: disable=no-member
f.write(packer_config)
f.close()

if DEBUG:
print("Generated configuration file for packer: {}".format(f.name))
print("======================= With content ========================")
print(packer_config)
print("====================== end of content =======================")

return f.name


Expand Down

0 comments on commit 5fdaa29

Please sign in to comment.