Hello, 

the following small code works, but the file /tmp/test will never be 
created because the schedule is skipped because running on an host.


   1. site.pp:
   2.     test::test_define {hallo:
   3.     }
   4.     include test
   5.  
   6. test/init.pp:
   7. class test {
   8. }
   9. test/test_define.pp
   10. define test::test_define {
   11.   schedule {$name:
   12.     period => daily,
   13.     range => '2-4',
   14.     repeat => 1;
   15.   }
   16.  
   17.   file {'/tmp/test':
   18.     ensure => present,
   19.     schedule => $name;
   20.   }
   21. }
   22.  
   23. Debug Log:
   24.  
   25. 
   26. Debug: catalog supports formats: b64_zlib_yaml dot pson raw yaml; 
   using pson
   27. Info: Caching catalog for test2.zdkwh.mlrbw.net
   28. Debug: Creating default schedules
   29. Debug: Loaded state in 0.07 seconds
   30. Info: Applying configuration version '1379405805'
   31. Debug: /Schedule[daily]: Skipping device resources because running 
   on a host
   32. Debug: /Schedule[monthly]: Skipping device resources because running 
   on a host
   33. Debug: /Schedule[hourly]: Skipping device resources because running 
   on a host
   34. Debug: /Schedule[never]: Skipping device resources because running 
   on a host
   35. *Debug: 
   /Stage[main]//Node[default]/Test::Test_define[hallo]/File[/tmp/test]: Not 
   scheduled*
   36. *Debug: 
   /Stage[main]//Node[default]/Test::Test_define[hallo]/Schedule[hallo]: 
   Skipping device resources because running on a host*
   37. Debug: /Schedule[weekly]: Skipping device resources because running 
   on a host
   38. Debug: /Schedule[puppet]: Skipping device resources because running 
   on a host
   39. Debug: Finishing transaction 70022790653200
   40. Debug: Storing state
   41. Debug: Stored state in 0.17 seconds
   42. Notice: Finished catalog run in 0.26 seconds
   43. Debug: report supports formats: b64_zlib_yaml pson raw yaml; using 
   pson
   Thanks in advance!
   
   

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to