Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class icinga2master {
- include 'gcc'
- include 'apt'
- include 'git'
- include 'stdlib'
- include 'ruby'
- include 'puppi'
- include 'perl'
- include ::mysql::server
- class { '::icinga2':
- confd => false,
- features => ['checker','mainlog','notification','statusdata','compatlog','command'],
- constants => {
- 'ZoneName' => 'master',
- },
- }
- $apt_packages = [ "php7.0", "libapache2-mod-php7.0", "ruby-dev", "make", "g++" ]
- package { $apt_packages:
- ensure => 'present',
- provider => apt,
- }
- class { 'nodejs':
- repo_url_suffix => "7.x",
- }
- class { 'docker':
- docker_users => ['nagios'],
- }
- class { '::docker::compose':
- version => '1.14.0',
- }
- mysql::db { 'icinga2':
- user => 'icinga2',
- password => 'supersecret',
- host => 'localhost',
- grant => ['SELECT', 'INSERT', 'UPDATE', 'DELETE', 'DROP', 'CREATE VIEW', 'CREATE', 'INDEX', 'EXECUTE', 'ALTER', 'REFERENCES'],
- }
- mysql::db { 'icingaweb2':
- user => 'icingaweb2',
- password => 'icingaweb2',
- host => 'localhost',
- grant => ['SELECT', 'INSERT', 'UPDATE', 'DELETE', 'DROP', 'CREATE VIEW', 'CREATE', 'INDEX', 'EXECUTE', 'ALTER', 'REFERENCES'],
- }
- class{ '::icinga2::feature::idomysql':
- user => 'icinga2',
- password => 'supersecret',
- database => 'icinga2',
- import_schema => true,
- require => Mysql::Db['icinga2'],
- }
- class { '::icinga2::feature::debuglog': }
- icinga2::object::zone { 'global-templates':
- global => true,
- }
- class {'icingaweb2':
- manage_repo => true,
- import_schema => true,
- db_type => 'mysql',
- db_host => 'localhost',
- db_port => '3306',
- db_username => 'icingaweb2',
- db_password => 'icingaweb2',
- require => Mysql::Db['icingaweb2'],
- }
- icingaweb2::config::resource{'my-sql':
- type => 'db',
- db_type => 'mysql',
- host => 'localhost',
- port => '3306',
- db_name => 'icinga2',
- db_username => 'icinga2',
- db_password => 'supersecret',
- }
- icingaweb2::config::role{'linux-user':
- users => 'bob, pete',
- permissions => '*',
- filters => {
- 'monitoring/filter/objects' => '*',
- }
- }
- icingaweb2::config::groupbackend {'mysql-backend':
- backend => 'db',
- resource => 'my-sql',
- }
- }
- class {'gemrestclient':}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement