The general approach for this is: 1) Get the instance Id from the metadata service. 2) Download it with the file privisioner to the host running Packer. 3) use the shell-local provisioner to describe it and run arbitrary commands.
If you want to execute some thin on the vm launched by Packer you already have all the information in the metadata service. On Thu, Dec 6, 2018, 18:43 Ibrahim Buamod <[email protected] wrote: > Hi, > > I am not using winrm nor ssh .. I have something else embedded inside the > ami, how can I pass the AWS instance ip to the provisioning script > > -- > 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/4dc82053-3939-4a25-b587-892145a23282%40googlegroups.com > <https://groups.google.com/d/msgid/packer-tool/4dc82053-3939-4a25-b587-892145a23282%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CALz9Rt-ywPkcAcCGg5xuJ3syiqD3pqEEPPnuUcWWm6vE2HjWhA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
