So I created a Vagrant box with the following command:
vagrant package --base box_name_here --vagrantfile Vagrantfile --include manifests/
manifests/
is a directory with a puppet manifest and some subdirectories with some files used during the provisioning process. Puppet is called in the Vagrantfile like so:
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "manifests"
puppet.manifest_file = "web-dev.pp"
end
When I explore the packaged .box archive Vagrant creates, I see the folder located at box_name_here.box/includes/manifests
. However, vagrant up
dies with the following error when I try to run it:
The manifests path specified for Puppet does not exist: c:/vagrant/manifests
Are the files somewhere else?
I saw this post: https://github.com/mitchellh/vagrant/issues/344
But the answer is a bit opaque; I don't quite know how to translate the modulepath response to my manifests_path problem.
I altered the vagrantfile so that the line reads
puppet.manifests_path = "./manifests"
...but that did not correct the problem. I still get the same error message.
After some experimentation, the incredibly obvious answer is:
puppet.manifests_path = File.expand_path("../manifests", __FILE__)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With