python-packer icon indicating copy to clipboard operation
python-packer copied to clipboard

no output to stdout

Open adyrcz opened this issue 8 years ago • 7 comments

When I run a packer build of an AMI using this module, the command starts and runs......... and runs........ then just spits back my prompt. Is it done? Did it build? No clue... 😢

I've tried both Debug set to True & False p.build(parallel=True, debug=False, force=False) & p.build(parallel=True, debug=True, force=False)

I would like to have it output the same stdout that the native Packer outputs.

adyrcz avatar Jan 13 '17 05:01 adyrcz

I'll release a version with a fix for this soon

nir0s avatar Jan 13 '17 12:01 nir0s

Will it be possible to use the output as an object? for ex. when a packer run completes it returns the AMI ID of the freshly generated AMI. I'd like to use that and pass that through the SlackAPI and notify my channel that "AMI-XXXXXXXX was just generated"

adyrcz avatar Jan 14 '17 01:01 adyrcz

It seems like it was already added here:

https://github.com/nir0s/python-packer/pull/8/commits/f7d33e44518303a41aa931840ea1758609eeec5c.

see here: https://amoffat.github.io/sh/sections/special_arguments.html#out for reference

nir0s avatar Jan 14 '17 14:01 nir0s

In an unrelated subject, I'm doing quire a refactoring for v0.2.0 so it'll be easier to retrieve output, but I don't think it'll be trivial to do what you asked (like getting the AMI ID) as it depends on the provider you're using to create the image and on very potentially non-robust parsing of the output. I'll try to think of something.

nir0s avatar Jan 14 '17 14:01 nir0s

Thank you

adyrcz avatar Jan 29 '17 22:01 adyrcz

Any update on this?

mkohn avatar Oct 10 '17 23:10 mkohn

Hi, checking in on this. It would be very helpful to have.

iamaaronknight avatar Dec 07 '17 21:12 iamaaronknight