Packaged (embedded) Vagrantfile not processing...

9 views
Skip to first unread message

DarwinJS

unread,
Sep 21, 2016, 3:16:13 PM9/21/16
to Vagrant

Quick related question if anyone has a moment.


I did the embedded Vagrant file and it seems it was ignored.


1) From the packer docs, my understanding is that a packaged Vagrantfile is not used during "vagrant init", but should be used during "vagrant up" - please confirm if my understanding is correct because the documentation was a little vague (does not explicitly say "used during vagrant up")


2) If the above is correct, I may be having an end of line issue.


The top portion of the packaged Vagrantfile has no end of line characters, so looks like this in notepad (all one line). (Fyi viewing in an editor that understands both types of line endings (atom), it looks fine)


The rest of the file from my packager "vagrantfile_template" has end of line characters that display correctly in Windows.


I am both building with packer and using vagrant on WIndows.


This line ends up being one line which I assume means it isn't running due to the comment character.

# The contents below were provided by the Packer Vagrant post-processor Vagrant.configure("2") do |config| config.vm.base_mac = "08002775BD9E" end # The contents below (if any) are custom contents provided by the # Packer template during image build.


But the part that looks correct does not run.

Alvaro Miranda Aguilera

unread,
Sep 21, 2016, 4:09:29 PM9/21/16
to vagra...@googlegroups.com
Hello

Can you save the Vagrantfile with unix/linux end of line?

You could just update the Vagrantfile at:
<home_directory>/.vagrant.d/boxes/<nameofthebox>/Vagrantfile

You can add some control to that file ie

puts "loading Vagrantfile in box"

or something to see if the file is being read.

It should be read for any action even for vagrant status on the directory where the vagrantfile is using the box.

Thanks
Alvaro.

--
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/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/26202190-e568-43e0-95a9-b335b85be68c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages