Advertisement
Guest User

Untitled

a guest
Mar 31st, 2015
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1. 0 ~/work/puppet (pr/3535) $ cat multi_dir_recurse_mtime.pp
  2. File {
  3. backup => false
  4. }
  5.  
  6. file { '/tmp/sourcedir':
  7. ensure => directory,
  8. }
  9.  
  10. file { '/tmp/sourcedir/file1':
  11. ensure => file,
  12. content => ''
  13. }
  14.  
  15. file { '/tmp/sourcedir/dir1':
  16. ensure => directory,
  17. }
  18.  
  19. file { '/tmp/sourcedir/dir1/file2':
  20. ensure => file,
  21. content => 'abc'
  22. }
  23.  
  24. file { '/tmp/dest':
  25. ensure => directory,
  26. recurse => true,
  27. checksum => mtime,
  28. source => '/tmp/sourcedir'
  29. }
  30. 0 ~/work/puppet (pr/3535) $ rm -rf /tmp/dest/
  31. 0 ~/work/puppet (pr/3535) $ be puppet apply multi_dir_recurse_mtime.pp
  32. Notice: Compiled catalog for agent3 in environment production in 0.42 seconds
  33. Notice: /Stage[main]/Main/File[/tmp/sourcedir/dir1/file2]/content: content changed '{md5}202cb962ac59075b964b07152d234b70' to '{md5}900150983cd24fb0d6963f7d28e17f72'
  34. Notice: /Stage[main]/Main/File[/tmp/dest]/ensure: created
  35. Notice: /Stage[main]/Main/File[/tmp/dest/dir1]/ensure: created
  36. Notice: /Stage[main]/Main/File[/tmp/dest/dir1/file2]/ensure: defined content as '{mtime}2015-02-03 22:14:34 -0800'
  37. Notice: /Stage[main]/Main/File[/tmp/dest/file]/ensure: defined content as '{mtime}2015-02-03 22:01:57 -0800'
  38. Notice: /Stage[main]/Main/File[/tmp/dest/file1]/ensure: defined content as '{mtime}2015-02-03 22:04:30 -0800'
  39. Notice: Applied catalog in 0.07 seconds
  40. 0 ~/work/puppet (pr/3535) $ be puppet apply multi_dir_recurse_mtime.pp
  41. Notice: Compiled catalog for agent3 in environment production in 0.41 seconds
  42. Notice: Applied catalog in 0.06 seconds
  43. 0 ~/work/puppet (pr/3535) $ echo -n 'abc' > /tmp/sourcedir/dir1/file2
  44. 0 ~/work/puppet (pr/3535) $ openssl md5 < /tmp/sourcedir/dir1/file2
  45. 900150983cd24fb0d6963f7d28e17f72
  46. 0 ~/work/puppet (pr/3535) $ be puppet apply multi_dir_recurse_mtime.pp
  47. Notice: Compiled catalog for agent3 in environment production in 0.41 seconds
  48. Notice: /Stage[main]/Main/File[/tmp/dest/dir1/file2]/content: content changed '{mtime}2015-02-03 22:14:34 -0800' to '{mtime}2015-02-03 22:14:45 -0800'
  49. Notice: Applied catalog in 0.06 seconds
  50. 0 ~/work/puppet (pr/3535) $ be puppet apply multi_dir_recurse_mtime.pp
  51. Notice: Compiled catalog for agent3 in environment production in 0.41 seconds
  52. Notice: Applied catalog in 0.06 seconds
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement