Issue #11362 has been updated by Matthaus Litteken.
Status changed from Unreviewed to Needs More Information
Assignee set to Matthaus Litteken
For centos 6 the cron package is called cronie. This will vary greatly across
platforms. If you replace your `package {"cron": ensure => present, }` with
`package {"cronie": ensure => present, }`.
You also probably want to add a `require => Package["cronie"],` to your cron
resource to ensure that the package gets evaluated before the cron resource.
That may be why you're seeing the no cron provider failure, because there is no
order guaranteed between those two resources (the cron entry and the package).
----------------------------------------
Bug #11362: Could not find a default provider for cron
https://projects.puppetlabs.com/issues/11362
Author: joy huang
Status: Needs More Information
Priority: Normal
Assignee: Matthaus Litteken
Category:
Target version:
Affected Puppet version:
Keywords:
Branch:
hi
(1)
I deployed puppet2.74+dashboard1.2.3+passenger+ 1.6.3 on centos6.0,but i have
some trouble about cron resource,the puppet agent indicates the following error:
[root@client2 ~]# puppet agent --test --noop --verbose
info: Caching catalog for client2.joy.com
err: Failed to apply catalog: Could not find a default provider for cron"
(2) The manifest on puppet master is the following:
[root@centosVM puppet]# tree /etc/puppet/manifests/
/etc/puppet/manifests/
├── class
│ └── classone.pp
└── site.pp
1 directory, 2 files
[root@centosVM puppet]# cat /etc/puppet/manifests/site.pp
import "class/classone.pp"
node "centos6.joy.com" {
include kernel::augeas_one
include en_cron
notify { "operatingsystem is $operatingsystem":
withpath => true,
}
}
node "client2.joy.com" {
include en_cron
}
[root@centosVM puppet]# cat /etc/puppet/manifests/class/classone.pp
class en_cron{
$vim_pkg=$operatingsystem? {
CentOS => "vim-enhanced",
default => "vim-minimal"
}
package {"$vim_pkg":
ensure => "present"
}
package {"cron":
ensure => "present"
}
cron {"ntp":
ensure => present,
command => "/usr/sbin/ntpdate 0.rhel.pool.ntp.org",
user => root,
hour => ['2-23'],
minute => "*/5",
}
}
class en_file{
file { "/root/scripts":
ensure => directory
}
file {"/root/scripts/check_inode.sh":
ensure => "file",
source => "puppet://$server/flist/check_inode.sh",
mode => 755,
require => File["/root/scripts"]
}
}
any helps welcome
best regards
joy
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.