Created
August 8, 2017 10:54
-
-
Save yaron-idan/6f3be9fe22e978f9546be6c3cb835af0 to your computer and use it in GitHub Desktop.
icingaweb2 class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class icinga2test::icingaweb2 { | |
# Icingaweb configuration | |
include ::mysql::server | |
$web_apt_packages = [ 'php7.0', 'libapache2-mod-php7.0' ] | |
package { $web_apt_packages: | |
ensure => 'present', | |
provider => apt, | |
} | |
mysql::db { 'icingaweb2': | |
user => 'icingaweb2', | |
password => 'icingaweb2', | |
host => 'localhost', | |
grant => ['SELECT', 'INSERT', 'UPDATE', 'DELETE', 'DROP', 'CREATE VIEW', 'CREATE', 'INDEX', 'EXECUTE', 'ALTER', 'REFERENCES'], | |
} | |
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 => 'icingaweb2', | |
db_username => 'icingaweb2', | |
db_password => 'icingaweb2', | |
} | |
icingaweb2::config::resource{'icinga2': | |
type => 'db', | |
db_type => 'mysql', | |
host => 'localhost', | |
port => '3306', | |
db_name => 'icinga2', | |
db_username => 'icinga2', | |
db_password => 'supersecret', | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class icinga2test { | |
include ::mysql::server | |
mysql::db { 'icinga2': | |
user => 'icinga2', | |
password => 'supersecret', | |
host => 'localhost', | |
grant => ['SELECT', 'INSERT', 'UPDATE', 'DELETE', 'DROP', 'CREATE VIEW', 'CREATE', 'INDEX', 'EXECUTE', 'ALTER', 'LOCK TABLES'], | |
} | |
class { '::icinga2': | |
#confd => false, | |
manage_repo => true, | |
features => ['checker','mainlog','notification','statusdata','compatlog','command'], | |
#constants => { | |
# 'ZoneName' => 'master', | |
#}, | |
} | |
class{ '::icinga2::feature::idomysql': | |
user => 'icinga2', | |
password => 'supersecret', | |
database => 'icinga2', | |
import_schema => true, | |
require => Mysql::Db['icinga2'], | |
} | |
# Ticket salt removed, no longer a bool - now the default value is 'TicketSalt' | |
class { '::icinga2::feature::api': | |
#accept_commands => true, | |
#accept_config => true, | |
} | |
class { '::icinga2test::icingaweb2': } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment