init.pp 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # == Class: nagbot
  2. #
  3. # Nagbot IRC notification/commands bot.
  4. #
  5. # === Parameters
  6. #
  7. #
  8. # === Examples
  9. #
  10. # class { 'nagbot': }
  11. #
  12. # === Authors
  13. #
  14. # Sebastien Badia <seb@sebian.fr
  15. #
  16. # === Copyright
  17. #
  18. # Copyright 2014 Sebastien Badia, unless otherwise noted.
  19. #
  20. class nagbot(
  21. $irc_server = 'irc.geeknode.net',
  22. $irc_chatnet = 'geeknode',
  23. $irc_port = '6697',
  24. $irc_ssl = 'no',
  25. $irc_autoconnect = 'no',
  26. $irc_autosendcmd = '/^msg C nick IDENTIFY mybotpassword',
  27. $channel_name = '#main_channel',
  28. $channel_chatnet = 'geeknode',
  29. $channel_passwd = 'password',
  30. $channel_autojoin = 'Yes',
  31. $nickname = 'nagbot',
  32. $nagios_command = '/var/lib/nagios3/rw/live',
  33. $fifo_remote_file = '/home/tc-14/var/nagios-fifo'
  34. ) {
  35. package { 'nagbot':
  36. ensure => installed,
  37. }
  38. file { '/etc/nagbot/config' :
  39. ensure => present,
  40. owner => 'nagbot',
  41. group => 'nagbot',
  42. mode => '0644',
  43. content => template('nagbot/config.erb'),
  44. require => Package['nagbot'],
  45. }
  46. }