Advertisement
Guest User

Untitled

a guest
Jul 31st, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. class icinga2master {
  2. include 'gcc'
  3. include 'apt'
  4. include 'git'
  5. include 'stdlib'
  6. include 'ruby'
  7. include 'puppi'
  8. include 'perl'
  9. include ::mysql::server
  10.  
  11. class { '::icinga2':
  12. confd => false,
  13. features => ['checker','mainlog','notification','statusdata','compatlog','command'],
  14. constants => {
  15. 'ZoneName' => 'master',
  16. },
  17. }
  18.  
  19. $apt_packages = [ "php7.0", "libapache2-mod-php7.0", "ruby-dev", "make", "g++" ]
  20. package { $apt_packages:
  21. ensure => 'present',
  22. provider => apt,
  23. }
  24.  
  25. class { 'nodejs':
  26. repo_url_suffix => "7.x",
  27. }
  28.  
  29. class { 'docker':
  30. docker_users => ['nagios'],
  31. }
  32.  
  33. class { '::docker::compose':
  34. version => '1.14.0',
  35. }
  36.  
  37. mysql::db { 'icinga2':
  38. user => 'icinga2',
  39. password => 'supersecret',
  40. host => 'localhost',
  41. grant => ['SELECT', 'INSERT', 'UPDATE', 'DELETE', 'DROP', 'CREATE VIEW', 'CREATE', 'INDEX', 'EXECUTE', 'ALTER', 'REFERENCES'],
  42. }
  43.  
  44. mysql::db { 'icingaweb2':
  45. user => 'icingaweb2',
  46. password => 'icingaweb2',
  47. host => 'localhost',
  48. grant => ['SELECT', 'INSERT', 'UPDATE', 'DELETE', 'DROP', 'CREATE VIEW', 'CREATE', 'INDEX', 'EXECUTE', 'ALTER', 'REFERENCES'],
  49. }
  50.  
  51. class{ '::icinga2::feature::idomysql':
  52. user => 'icinga2',
  53. password => 'supersecret',
  54. database => 'icinga2',
  55. import_schema => true,
  56. require => Mysql::Db['icinga2'],
  57. }
  58.  
  59. class { '::icinga2::feature::debuglog': }
  60.  
  61. icinga2::object::zone { 'global-templates':
  62. global => true,
  63. }
  64.  
  65. class {'icingaweb2':
  66. manage_repo => true,
  67. import_schema => true,
  68. db_type => 'mysql',
  69. db_host => 'localhost',
  70. db_port => '3306',
  71. db_username => 'icingaweb2',
  72. db_password => 'icingaweb2',
  73. require => Mysql::Db['icingaweb2'],
  74. }
  75.  
  76. icingaweb2::config::resource{'my-sql':
  77. type => 'db',
  78. db_type => 'mysql',
  79. host => 'localhost',
  80. port => '3306',
  81. db_name => 'icinga2',
  82. db_username => 'icinga2',
  83. db_password => 'supersecret',
  84. }
  85.  
  86. icingaweb2::config::role{'linux-user':
  87. users => 'bob, pete',
  88. permissions => '*',
  89. filters => {
  90. 'monitoring/filter/objects' => '*',
  91. }
  92. }
  93.  
  94. icingaweb2::config::groupbackend {'mysql-backend':
  95. backend => 'db',
  96. resource => 'my-sql',
  97. }
  98. }
  99.  
  100. class {'gemrestclient':}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement