2

I'm using a Vagrantfile that looks like this:

Vagrant::Config.run do |config|
  config.vm.define :puppet do |c|
    c.vm.host_name = 'puppet.domain.com'
    c.vm.box = "precise64"
    c.vm.network :hostonly, "192.168.33.100"

    c.vm.provision :puppet  # This sets up puppetmaster and puppet configs

    c.vm.provision :puppet_server do |puppet|
      puppet.puppet_server = 'puppet.domain.com'
      puppet.puppet_node = 'puppet.domain.com'
    end
  end
end

When they both run on start up, the client never connects to the master, presumably because the master hasn't started listening on the port yet.

How do I get Vagrant to delay the execution of puppet agent? Maybe there's another way of going about it?

1
  • 3
    The title of this question would be right at home on Gaming.SE Commented Jan 5, 2013 at 4:31

1 Answer 1

1

It's a bit of a hack (ashamed), but in my puppet manifest I've added a sleep:

exec { 'wait_for_puppet':
    command => '/bin/sleep 10',
    require => Service['puppetmaster'],
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.