Guest User

Untitled

a guest
Aug 19th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. ## /etc/puppet/modules/bacula/manifests/init.pp
  2.  
  3. class bacula::client::install {
  4. package{"bacula-client":
  5. ensure => latest,
  6. notify => Class["bacula::client::service"],
  7. require => Yumrepo["internal"],
  8. }
  9. }
  10.  
  11. class bacula::client::config {
  12. file{"/etc/bacula/bacula-fd.conf":
  13. owner => root,
  14. group => root,
  15. mode => 640,
  16. content => template("bacula/bacula-fd.conf.erb"),
  17. require => Class["bacula::client::install"],
  18. notify => Class["bacula::client::service"]
  19. }
  20.  
  21. @@file{"/etc/bacula/client/$fqdn.conf":
  22. content => template("bacula/ClientDef.erb"),
  23. tag => "bacula::ClientDef",
  24. notify => Class["bacula::director"]
  25. }
  26. }
  27.  
  28. class bacula::client::service {
  29. service{"bacula-fd":
  30. enable => true,
  31. ensure => running,
  32. hasstatus => true,
  33. hasrestart => true,
  34. require => Class["bacula::client::config"],
  35. }
  36. }
  37.  
  38. class bacula::client {
  39. include bacula::client::install, bacula::client::config,
  40. bacula::client::service
  41. }
  42.  
  43. class bacula::director {
  44. file{"/etc/bacula/client":
  45. ensure => directory
  46. }
  47.  
  48. File <<| tag == "bacula::ClientDef" |>>
  49. }
  50.  
  51. ## /etc/puppet/manifests/nodes.pp
  52.  
  53. node "infra01" {
  54. include bacula::client
  55. include bacula::director
  56. }
Add Comment
Please, Sign In to add comment