Re: Problem using Vagrant + Puppet

191 views
Skip to first unread message
Message has been deleted

Felix Massem

unread,
May 20, 2014, 11:26:49 AM5/20/14
to puppet...@googlegroups.com
HeyRafaella,

try this in your Vagrant File

        # provisioning with puppet
        server.vm.provision "puppet" do |puppet|
                puppet.manifests_path = "manifests"
                puppet.manifest_file = "db.pp"
                puppet.module_path = "modules"
        end

cheers felix

Am Dienstag, 20. Mai 2014 16:06:20 UTC+2 schrieb Rafaella Keury:
Hello,
I'm using Vagrant and i'm trying to use Puppet as a tool for provisioning one of my virtual machines.
I created a folder named 'manifests' in the same directory of my VagrantFile. Inside the 'manifests' folder I created a file named db.pp with the following content:
"exec { "apt-update":
command => "/usr/bin/apt-get update"
}
package { "mysql-server":
ensure => installed,
require => Exec["apt-update"],
}"

My VagrantFile looks like this:
"VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "hashicorp/precise32"
config.vm.define :db do |db_config|
db_config.vm.network :private_network, :ip => "192.168.33.10"
db_config.vm.provision "puppet" do |puppet|
puppet.manifest_file = "db.pp"
end
end"

But when I type vagrant up db on command line, I receive the following error message:
"The configured puppet manifest is missing. Please specify a path to an existing manifest"
Does anyone know what is it?
My OS is Windows 7.
Thanks a lot!

Rafaella Keury

unread,
May 20, 2014, 12:10:51 PM5/20/14
to puppet...@googlegroups.com
Hi Felix!
Thanks a lot for your answer, but it still doesn't work and I get the same error.

Rob Reynolds

unread,
May 20, 2014, 12:36:43 PM5/20/14
to puppet...@googlegroups.com
Here is a working example, try to see what you can pull from it -

Also, unless you are using multi-machine configuration, there is no reason to do config.vm.define.

Note this line to provide you more information:
  config.vm.provision :puppet, :options => ["--debug --trace --verbose"] do |puppet|

If you are still running into problems, try setting the VAGRANT_LOG variable for more information - see http://docs.vagrantup.com/v2/other/debugging.html



--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/a5487105-5cb9-43b9-8f44-009f9bf8d8d5%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Rob Reynolds
Developer, Puppet Labs

Join us at PuppetConf 2014September 23-24 in San Francisco
Register by May 30th to take advantage of the Early Adopter discount save $349!

Nikola Petrov

unread,
May 21, 2014, 10:42:29 AM5/21/14
to puppet...@googlegroups.com
On Tue, May 20, 2014 at 07:06:20AM -0700, Rafaella Keury wrote:
> Hello,
> I'm using Vagrant and i'm trying to use Puppet as a tool for provisioning
> one of my virtual machines.
> I created a folder named 'manifests' in the same directory of my
> VagrantFile. Inside the 'manifests' folder I created a file named db.pp
> with the following content:
> "exec { "apt-update":
> command => "/usr/bin/apt-get update"
> }
> package { "mysql-server":
> ensure => installed,
> require => Exec["apt-update"],
> }"

You will need to wrap that in

node default {
}

The file that you give as manifest_file to vagrant should be a
manifest with node definitions

>
> My VagrantFile looks like this:
> "VAGRANTFILE_API_VERSION = "2"
> Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
> config.vm.box = "hashicorp/precise32"
> config.vm.define :db do |db_config|
> db_config.vm.network :private_network, :ip => "192.168.33.10"
> db_config.vm.provision "puppet" do |puppet|
> puppet.manifest_file = "db.pp"
> end
> end"
>
> But when I type vagrant up db on command line, I receive the following
> error message:
> "The configured puppet manifest is missing. Please specify a path to an
> existing manifest"
> Does anyone know what is it?
> My OS is Windows 7.
> Thanks a lot!
>
> --
> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/40e0040c-7634-4f6c-865c-f31357ff8cb3%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages