I seem to be missing something. I''ve copied the files from this module https://github.com/torrancew/puppet-cron into my modulepath $ puppet master --configprint modulepath /etc/puppet/modules:/usr/share/puppet/modules so it looks like this: /etc/puppet/modules/cron-job/ /etc/puppet/modules/cron-job/manifests/ /etc/puppet/modules/cron-job/manifests/daily.pp /etc/puppet/modules/cron-job/manifests/hourly.pp /etc/puppet/modules/cron-job/manifests/init.pp /etc/puppet/modules/cron-job/manifests/install.pp /etc/puppet/modules/cron-job/manifests/job.pp /etc/puppet/modules/cron-job/manifests/monthly.pp /etc/puppet/modules/cron-job/manifests/weekly.pp /etc/puppet/modules/cron-job/templates/ /etc/puppet/modules/cron-job/templates/job.erb AFAICT from the docs I should be able to do just this in my own manifests include daily but all I get is Could not find class daily What am I doing wrong? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/UumLCdAWIYwJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Jenner La Fave
2012-Oct-29 23:19 UTC
[Puppet Users] Re: how to install a module from github
cron::daily is actually a defined resource type, so you need to declare that resource as opposed to including a class. If you have multiple nodes that you would like to include the same cron job on, you can write your own class that declares a cron resources and include that. It''s hard to say without knowing what you''re trying to do, but something like this might be a good place to start: class crontest { cron::daily {"test_cron_job": minute => ''0,15,30,45'', hour => ''0,12'', command => ''/usr/bin/derp --foo''; } } On Monday, October 29, 2012 4:03:30 PM UTC-7, Kevin G. wrote:> > I seem to be missing something. I''ve copied the files from this module > https://github.com/torrancew/puppet-cron into my modulepath > > $ puppet master --configprint modulepath > /etc/puppet/modules:/usr/share/puppet/modules > > > so it looks like this: > > /etc/puppet/modules/cron-job/ > /etc/puppet/modules/cron-job/manifests/ > /etc/puppet/modules/cron-job/manifests/daily.pp > /etc/puppet/modules/cron-job/manifests/hourly.pp > /etc/puppet/modules/cron-job/manifests/init.pp > /etc/puppet/modules/cron-job/manifests/install.pp > /etc/puppet/modules/cron-job/manifests/job.pp > /etc/puppet/modules/cron-job/manifests/monthly.pp > /etc/puppet/modules/cron-job/manifests/weekly.pp > /etc/puppet/modules/cron-job/templates/ > /etc/puppet/modules/cron-job/templates/job.erb > > > AFAICT from the docs I should be able to do just this in my own manifests > > include daily > > > but all I get is > > Could not find class daily > > > What am I doing wrong? >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/rC-QLmUwnFEJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Monday, October 29, 2012 4:19:11 PM UTC-7, Jenner La Fave wrote:> > cron::daily is actually a defined resource type, so you need to declare > that resource as opposed to including a class. If you have multiple nodes > that you would like to include the same cron job on, you can write your own > class that declares a cron resources and include that. > > It''s hard to say without knowing what you''re trying to do, but something > like this might be a good place to start: > > class crontest { > cron::daily {"test_cron_job": > minute => ''0,15,30,45'', > hour => ''0,12'', > command => ''/usr/bin/derp --foo''; > } > } >That''s what I thought at first, but doing that I get: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type cron::daily so I figured I needed to include the file first. Am I still missing something? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/DytFQBF-C1wJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Jenner La Fave
2012-Oct-29 23:38 UTC
[Puppet Users] Re: how to install a module from github
Oh, right. You need to rename /etc/puppet/modules/cron-job/ to cron/ The outermost directory needs to match the module name which needs to be "cron". http://docs.puppetlabs.com/puppet/2.7/reference/modules_fundamentals.html On Monday, October 29, 2012 4:31:53 PM UTC-7, Kevin G. wrote:> > On Monday, October 29, 2012 4:19:11 PM UTC-7, Jenner La Fave wrote: >> >> cron::daily is actually a defined resource type, so you need to declare >> that resource as opposed to including a class. If you have multiple nodes >> that you would like to include the same cron job on, you can write your own >> class that declares a cron resources and include that. >> >> It''s hard to say without knowing what you''re trying to do, but something >> like this might be a good place to start: >> >> class crontest { >> cron::daily {"test_cron_job": >> minute => ''0,15,30,45'', >> hour => ''0,12'', >> command => ''/usr/bin/derp --foo''; >> } >> } >> > > That''s what I thought at first, but doing that I get: > > Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid > resource type cron::daily > > > so I figured I needed to include the file first. > > Am I still missing something? > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/uJi7xYKnRikJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Monday, October 29, 2012 4:38:07 PM UTC-7, Jenner La Fave wrote:> > Oh, right. You need to rename /etc/puppet/modules/cron-job/ to cron/ > > The outermost directory needs to match the module name which needs to be > "cron". >Aha! That''s it, thank you!> > http://docs.puppetlabs.com/puppet/2.7/reference/modules_fundamentals.html >So I went back and peered at that page again and even in retrospect, knowing the answer, it was hard to see on there, but there it is, "This outermost directory’s name matches the name of the module." I don''t know how that could be any clearer, but it''s still hard to see. Well, I gave torrancew on github a pull request to add a hint to his README.mk, maybe that''ll help the next guy with my problem. Thanks so much! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/hd040zKsWy8J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.