Thanks i Will give this a shot. The reason i want it is my build agent is
building the packer image. Afterwards i want to use serverspec to winrm
and run some verfication tests against the box. In order to do this i must
specify the hostname of the box
On Friday, June 2, 2017 at 7:41:11 AM UTC-5, Rickard von Essen wrote:
>
> I'm not sure why you need the hostname?
>
> But if you need to get that to the machine running Packer you can do
> something like:
>
> "provisioners": [
> {
> "type": "shell",
> "inline": [ "hostname > /tmp/hostname" ]
> },
> {
> "type": "file",
> "direction": "download",
> "source": "/tmp/hostname",
> "destination": "hostname"
> }
> ]
>
> And you will get the hostname in the file "hostname".
>
> On 2 June 2017 at 14:25, <[email protected] <javascript:>>
> wrote:
>
>> I am wanting to run some serverspec tests against my vagrant box but i'm
>> not really sure how to get the virtualmachines hostname from packer or how
>> to configure a hostname. Anyone know if this i possible?
>>
>> --
>> 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] <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/packer-tool/4328edb6-bd18-40b6-81f3-73f9aa61fd4a%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/packer-tool/4328edb6-bd18-40b6-81f3-73f9aa61fd4a%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/cf638c57-a149-4735-87ad-2c992470cfb5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.