Guest User

Untitled

a guest
Jul 22nd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. mcollective::plugin{"foo": type => "agent" }
  2. mcollective::plugin{"audit_foo": type => "audit", pluginname => "foo" }
  3.  
  4.  
  5. define mcollective::plugin ($type, $ensure="present", $pluginname="") {
  6. if $pluginname == "" {
  7. $plugname = $name
  8. } else {
  9. $plugname = $pluginname
  10. }
  11.  
  12. if $ensure == "present" {
  13. file{"/usr/libexec/mcollective/mcollective/${type}/${plugname}.rb":
  14. owner => root,
  15. group => root,
  16. mode => 444,
  17. ensure => present,
  18. require => Class["mcollective::config"],
  19. notify => Class["mcollective::service"],
  20. source => "puppet:///modules/mcollective/${type}/${plugname}.rb"
  21. }
  22. } else {
  23. file{"/usr/libexec/mcollective/mcollective/${type}/${plugname}.rb":
  24. ensure => absent,
  25. notify => Class["mcollective::service"],
  26. }
  27. }
  28. }
Add Comment
Please, Sign In to add comment