How do I make sure a module is loaded before puppet requests a specific resource type. For example, node ''test'' { include cron cron { "my-test-cron": } } -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.
How do I make sure a module is loaded before puppet requests a specific resource type. For example, node ''test'' { include cron cron { "my-test-cron": } } -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.
How do I make sure a module is loaded before puppet requests a specific resource type. For example, node ''test'' { include cron cron { "my-test-cron": } } -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.
How do I make sure a module is loaded before puppet requests a specific resource type. For example, node ''test'' { include cron cron { "my-test-cron": ....., requires => Package["vixie-cron"] } } # Module - cron/manifests/init.pp class cron { package { "vixie-cron": ensure => latest } service { "crond": enable => true, ensure => running, subscribe => Package["vixie-cron"] } # Make Sure Cron Starts on Boot exec { "chkconfig-cron": command => "/sbin/chkconfig --level 345 crond on", require => Package["vixie-cron"] } } This fails with "err: Could not create my-test-cron: Could not find a default provider for cron" because the cron module doesn''t get called before the cron resource type. How do I fix this? I''m using puppet 0.24.8 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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 Dec 7, 11:19 am, jokeeffe <jete.okee...@gmail.com> wrote:> How do I make sure a module is loaded before puppet requests a > specific resource type. For example,[...]> This fails with "err: Could not create my-test-cron: Could not find a > default provider for cron" because the cron module doesn''t get called > before the cron resource type. How do I fix this? I''m using puppet > 0.24.8I think it''s important to understand the Puppet execution model here. It is described among Reductive''s docs: http://reductivelabs.com/trac/puppet/wiki/PuppetInternals The key point related to this question is that Puppet instantiates its entire configuration model before it makes any changes to the client system (including choosing a provider for each resource), so no effort to tweak its order of operation is going to solve the problem. (Indeed, with Puppet it is rarely useful to think in terms of execution order.) Things you could try: 1) If you cannot rely on a cron package to be installed before the Puppet run, then it may help to explicitly specify the provider for your cron resource: cron { "my-test-cron": # ... provider => "crontab", require => Package["vixie-cron"], } 2) Search this group for threads about bootstrapping. You should find several discussing the use of tags and / or environments bootstrap a client configuration before applying its normal manifest. Note also: you probably don''t need that Exec resource for crond, as the Service resource with enable => true will normally handle the task. You only need an Exec if you want different runlevels than Service gives you, in which case you should use two Execs -- one to turn on the service in the runlevels you want, and one to turn it off in all the others. (Service''s support for runlevel control is sadly lacking through 0.25.1; there is an outstanding feature request to make it better.) -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.