hello

when you add a vagrant box, it will add it to:

~/.vagrant.d/boxes

when you include files in the box they get added in the compressed file of
the box.

think on the template vm on disk and other files.

When you do vagrant init, you are just creating a new Vagrantfile, that
tells the local project, what base box use (say a template)

At this moment, no files are copied from the ~/.vagrant.d/boxes to the
local directory.

When you do vagrant up, lets say with virtualbox, vagrant creates a VM in
the default path to have VMs in virtualbox settings.

At this moment, no files are copied from the ~/.vagrant.d/boxes to the
local directory.


So I am not sure I follow the bug part.

My suggestion will be check where the files end added, and see if you can
make it work.

However, i am not sure this is a bug.

no current operations copy files into the project folder, so is safe to
assume using chef, it won't copy them neither.

If you can specify the location, then on the included Vagrantfile you can
reference the path like

File.expand_path(File.dirname(__FILE__))

 If you got a file named "file.ext", will be

File.expand_path(File.dirname(__FILE__))/file.ext

Alvaro


On Wed, Nov 28, 2018 at 8:13 PM Nc Diesel <sy...@triad.rr.com> wrote:

> So:  No tip,tricks or hints on this?   To get my cookbooks in a newly
> created vagrant box and to have them present for provisioning I have to
> copy them from $HOME/.vagrant.d/... into my working directory.  This seems
> like a bug to me.  They should execute them in place from .vagrant.d or
> "vagrant init" should copy them, it seems to me
>
> $ vagrant up
> Bringing machine 'default' up with 'virtualbox' provider...
> ==> default: Importing base box 'mybox-050-2'...
> ==> default: Matching MAC address for NAT networking...
> ==> default: Setting the name of the VM: 050Test-2_default_1543430081688_64
> ==> default: Auto-generating node name for Chef...
> *==> default: The cookbook path
> 'C:/Users/XXXXXX/VagrantMachines/050Test-2/cookbooks' doesn't exist.
> Ignoring...*
>
>
> On Friday, November 16, 2018 at 10:11:12 AM UTC-5, Nc Diesel wrote:
>>
>> So I package a box:
>>
>> vagrant package --base MyDevelopment --output MyDevelopment-0.5.0.box
>> --include cookbooks --vagrantfile Vagrantfile
>>
>> When I untar the box, cookbooks and its entire tree and the correct
>> Vagrantfile are in there.  So far so good....
>>
>> But no combination of "vagrant box add" and "vagrant init" that I can
>> find will create box with the cookbooks directory tree nor does it
>> create/overwrite the Vagrant file with the Vagrantfile packaged with the
>> box.
>>
>> Any ideas what in the heck I am doing wrong??
>>
>> Thanks in advance!
>>
>>
>> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vagrant-up/4062862c-f250-4ec4-aeee-d76c061c217e%40googlegroups.com
> <https://groups.google.com/d/msgid/vagrant-up/4062862c-f250-4ec4-aeee-d76c061c217e%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/CAHqq0exxhdUVN4dRPNq6ujRjNZuB%2BgPqkdG6dL4gakvJYQNAng%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to