Issue #11362 has been updated by Stefan Schulte.

Reading the error message the catalog will not get applied at all if no 
suitable cron provider can be found (and that is the case when no crontab 
binary can be found). Since puppet will abort immediatly there is no chance for 
puppet to install the cron package in the first place.

This problem is addressed in #6907 and targeted for puppet 2.7.8.

As a workaround you can either

* install the cron package manually
* first apply a catalog with your cron package but without any cron resource. 
Now apply the regular catalog
----------------------------------------
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.

Reply via email to