Hello, I'm building an AMI that already includes a script that is supposed to be run on the first launch of the instance. My problem now is when someone wants to build a "child" AMI off of that AMI using my AMI as source_ami then my script will of course already run. I'm placing the script in /var/lib/cloud/scripts/per-once. Is there a way for me to determine inside the script if the instance was launched by packer? I was thinking about checking the Name tag on the instance for "Packer builder" but that can be overwritten. Is there an elegant way to solve this?
Thanks, Michael -- Geschäftsführer: Pontus Noren, James Monico Sitz der Gesellschaft: München Amtsgericht München - HRB 212683 - USt-IdNr.: DE296631220 -- The above terms reflect a potential business arrangement, are provided solely as a basis for further discussion, and are not intended to be and do not constitute a legally binding obligation. No legally binding obligations will be created, implied, or inferred until an agreement in final form is executed in writing by all parties involved. This email may be confidential or privileged. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let us know that it has gone to the wrong person. -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/packer/issues IRC: #packer-tool on Freenode --- You received this message because you are subscribed to the Google Groups "Packer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/425c66f4-368e-430a-b669-63139d29d75b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
