Majedur
Majedur

Reputation: 3242

Puppet command does not start stop service in ubuntu

service{'cron': ensure => 'running', enable => 'true', }

Error: change from 'running' to 'stopped' failed: systems stop for cron failed.

Upvotes: 0

Views: 210

Answers (1)

16c7x
16c7x

Reputation: 520

Drop this

service { 'crond':
  ensure   => 'running',
  enable   => 'true',
}

Into a file on a server, let's call the file crontest.pp then as root run puppet apply crontest.pp you should see cron start.

Also, if you're trying to debug this sort of thing a good starting place is to use puppet resource in this case puppet resource service, you should be able to see a list of all your services. Look through that to find the one relating to cron, it gives you the Puppet code for it's current state so you can copy that directly into a class file, just ignore the provider => line as the Puppet resource abstraction layer will take care of that.

Upvotes: 1

Related Questions