diff --git a/.yardoc/checksums b/.yardoc/checksums index 0bbebce..26491bb 100644 --- a/.yardoc/checksums +++ b/.yardoc/checksums @@ -1,33 +1,34 @@ manifests/init.pp 6e8dc19d52ffcca0b7a4430fe02fa2bc4de26231 manifests/repo.pp 56f4188f0115e9c1339cc7272009c93ff2879eec -manifests/config.pp f1870305c087047839902c757d2a0a718511bf3f -manifests/module.pp c31e3596723581fe47f9a70819c98ed2098c4f69 -manifests/globals.pp 68963b054797a17ab5775c8d853c914aec96998f +manifests/config.pp 5f4c789937e80907c109aa72864ab8adafbb8edd +manifests/module.pp 69fa65845d4b6a8e0e51532346dd080b80670d09 +manifests/globals.pp 8c739d9e9b685a1674b7ba076b6b23cf07e34948 manifests/install.pp b4ea88126f3dab2ad514a41cc271fa0d41fef3b9 manifests/inisection.pp 0d2c69f45ecd5afb40a2e4b5956c017be66ec008 manifests/module/doc.pp e07bd49cb95a60330545e86d91d937a0173d9ae0 manifests/module/ipl.pp b51c9c3dc753edb69fbb0b20ae37a00e60afca18 manifests/config/role.pp 2995727b3a144a9ea80f51c179e618059a346545 manifests/module/cube.pp 82663fe888fd3d185e8cf1e260705f4c10566794 manifests/module/vsphere.pp efdedbe2490a8119693d858648e8be7578298e14 -manifests/config/resource.pp 32bebb3f8521dfe2850534e2a5406d9c55329db6 -manifests/module/director.pp 394a92176dd6135395c0c532f0a9af8f41bd6e0a +manifests/config/resource.pp 991919c4df3ba75618940fd44460648e76fe889f +manifests/module/director.pp 9eac666d0f202240b8f343cbff746d877588b914 manifests/module/graphite.pp e1dc0cd7a53b009cffeb51e7cdf0d14870b99bb9 manifests/module/puppetdb.pp 75ac74be43c067f70eee1b8d77a8c1e6eec81c12 manifests/module/incubator.pp 5bc91db2356fa3ca850b0d3b4371d4870bbd37cb -manifests/config/authmethod.pp 9e0b6915f702a44bf1233ee3b0c5336e391eda67 +manifests/config/authmethod.pp 3d15a605123c0c7f9ef1efbc06cb478ff3528b4e manifests/module/generictts.pp 3d56c11584138a62c4c24aa3daee34a6894b5a78 manifests/module/monitoring.pp 202d7a19de736b676279d5bd9ec15cd46a5bf24c manifests/module/fileshipper.pp 6e0631b442e952f7d5f8a9783ae28439f4b60d19 manifests/module/reactbundle.pp 5063f51e0c34c81e421521c382b938c65d7571d1 manifests/module/translation.pp 548098f9c313d5e250aeddde3d77c10d32dee2cf manifests/config/groupbackend.pp cc8ec28028235be052656ba4c2521f4b4764d1ed manifests/module/elasticsearch.pp 91d36f25a2296ce04621a355600c5759cd4c7aab manifests/module/businessprocess.pp 6c78294ea1d97b4c5d92387df16b1cddbfdd8c64 +manifests/module/director/service.pp 51f87db3573f0656d1ae73a5af594c4d4c08057a manifests/module/fileshipper/basedir.pp 88bfb57c6e817e21f592f7ee87d7b851c12ee842 manifests/module/puppetdb/certificate.pp c78929b7a204e7ff0768e1c8d04296a65f5f3cf1 manifests/module/fileshipper/directory.pp 83368dbbe111e98fec0964873984f31dd68d55fb manifests/module/elasticsearch/instance.pp 18dab274d68c12ba957160a7cdda3f6a0308b92e manifests/module/elasticsearch/eventtype.pp 6815b2d7e8235ff15264180261280ee7fb0a1f56 manifests/module/generictts/ticketsystem.pp a3d4f27b125dd15f7b9dafdd64790087079596a0 manifests/module/monitoring/commandtransport.pp 73ec97547eb1bedaaf21bc62cd275eeb814da2d7 diff --git a/.yardoc/object_types b/.yardoc/object_types index 9c9e3cf..956b0eb 100644 Binary files a/.yardoc/object_types and b/.yardoc/object_types differ diff --git a/.yardoc/objects/root.dat b/.yardoc/objects/root.dat index 182131b..292c65b 100644 Binary files a/.yardoc/objects/root.dat and b/.yardoc/objects/root.dat differ diff --git a/REFERENCE.md b/REFERENCE.md index 49f8a13..ee457f1 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -1,1885 +1,1942 @@ # Reference ## Table of Contents **Classes** _Public Classes_ * [`icingaweb2`](#icingaweb2): Installs and configures Icinga Web 2. * [`icingaweb2::globals`](#icingaweb2globals): This class loads the default parameters by doing a hiera lookup. * [`icingaweb2::module::businessprocess`](#icingaweb2modulebusinessprocess): Installs and enables the businessprocess module. * [`icingaweb2::module::cube`](#icingaweb2modulecube): Installs and enables the cube module. * [`icingaweb2::module::director`](#icingaweb2moduledirector): Installs and configures the director module. +* [`icingaweb2::module::director::service`](#icingaweb2moduledirectorservice): Installs and configures the director service. * [`icingaweb2::module::doc`](#icingaweb2moduledoc): The doc module provides an interface to the Icinga 2 and Icinga Web 2 documentation. * [`icingaweb2::module::elasticsearch`](#icingaweb2moduleelasticsearch): The Elasticsearch module displays events from data stored in Elasticsearch. * [`icingaweb2::module::fileshipper`](#icingaweb2modulefileshipper): The fileshipper module extends the Director. It offers import sources to deal with CSV, JSON, YAML and XML files. * [`icingaweb2::module::generictts`](#icingaweb2modulegenerictts): Installs and enables the generictts module. * [`icingaweb2::module::graphite`](#icingaweb2modulegraphite): The Graphite module draws graphs out of time series data stored in Graphite. * [`icingaweb2::module::incubator`](#icingaweb2moduleincubator): Installs and enables the incubator module. * [`icingaweb2::module::ipl`](#icingaweb2moduleipl): Installs and enables the ipl module. * [`icingaweb2::module::monitoring`](#icingaweb2modulemonitoring): Manages the monitoring module. This module is mandatory for probably every setup. * [`icingaweb2::module::puppetdb`](#icingaweb2modulepuppetdb): Installs and configures the puppetdb module. * [`icingaweb2::module::reactbundle`](#icingaweb2modulereactbundle): Installs and enables the reactbundle module. * [`icingaweb2::module::translation`](#icingaweb2moduletranslation): Installs and configures the translation module. * [`icingaweb2::module::vsphere`](#icingaweb2modulevsphere): The vSphere module extends the Director. It provides import sources for virtual machines and physical hosts from vSphere. _Private Classes_ * `icingaweb2::config`: Configures Icinga Web 2. * `icingaweb2::install`: Installs Icinga Web 2 and extra packages. * `icingaweb2::repo`: Manages the packages.icinga.com repository based on the operating system. **Defined types** _Public Defined types_ * [`icingaweb2::config::authmethod`](#icingaweb2configauthmethod): Manage Icinga Web 2 authentication methods. Auth methods may be chained by setting proper ordering. * [`icingaweb2::config::groupbackend`](#icingaweb2configgroupbackend): Groups of users can be stored either in a database, LDAP or ActiveDirectory. This defined type configures backends that store groups. * [`icingaweb2::config::resource`](#icingaweb2configresource): Create and remove Icinga Web 2 resources. Resources may be referenced in other configuration sections. * [`icingaweb2::config::role`](#icingaweb2configrole): Roles define a set of permissions that may be applied to users or groups. * [`icingaweb2::inisection`](#icingaweb2inisection): Manage settings in INI configuration files. * [`icingaweb2::module`](#icingaweb2module): Download, enable and configure Icinga Web 2 modules. _Private Defined types_ * `icingaweb2::module::elasticsearch::eventtype`: Manages an Elasticsearch event types * `icingaweb2::module::elasticsearch::instance`: Manages an Elasticsearch instance * `icingaweb2::module::fileshipper::basedir`: Manages base directories for the fileshipper module. * `icingaweb2::module::fileshipper::directory`: Manages directories with plain Icinga 2 configuration files. * `icingaweb2::module::generictts::ticketsystem`: Manages ticketsystem configuration for the generictts module. * `icingaweb2::module::monitoring::commandtransport`: Manages commandtransport configuration for the monitoring module. * `icingaweb2::module::puppetdb::certificate`: Installs a certificate for the Icinga Web 2 puppetdb module. ## Classes ### icingaweb2 Installs and configures Icinga Web 2. #### Examples ##### Use MySQL as backend for user authentication: ```puppet include ::mysql::server mysql::db { 'icingaweb2': user => 'icingaweb2', password => 'supersecret', host => 'localhost', grant => [ 'ALL' ], } class {'icingaweb2': manage_repo => true, import_schema => true, db_type => 'mysql', db_host => 'localhost', db_port => 3306, db_username => 'icingaweb2', db_password => 'supersecret', require => Mysql::Db['icingaweb2'], } ``` ##### Use PostgreSQL as backend for user authentication: ```puppet include ::postgresql::server postgresql::server::db { 'icingaweb2': user => 'icingaweb2', password => postgresql_password('icingaweb2', 'icingaweb2'), } class {'icingaweb2': manage_repo => true, import_schema => true, db_type => 'pgsql', db_host => 'localhost', db_port => 5432, db_username => 'icingaweb2', db_password => 'icingaweb2', require => Postgresql::Server::Db['icingaweb2'], } ``` #### Parameters The following parameters are available in the `icingaweb2` class. ##### `logging` Data type: `Enum['file', 'syslog', 'php', 'none']` Whether Icinga Web 2 should log to 'file', 'syslog' or 'php' (web server's error log). Setting 'none' disables logging. Default value: 'file' ##### `logging_file` Data type: `Stdlib::Absolutepath` If 'logging' is set to 'file', this is the target log file. ##### `logging_level` Data type: `Enum['ERROR', 'WARNING', 'INFO', 'DEBUG']` Logging verbosity. Possible values are 'ERROR', 'WARNING', 'INFO' and 'DEBUG'. Default value: 'INFO' ##### `logging_facility` Data type: `Pattern[/user|local[0-7]/]` Logging facility when using syslog. Possible values are 'user' or 'local0' up to 'local7'. Default value: 'user' ##### `logging_application` Data type: `String` Logging application name when using syslog. Default value: 'icingaweb2' ##### `show_stacktraces` Data type: `Boolean` Whether to display stacktraces in the web interface or not. Default value: `false` ##### `module_path` Data type: `Stdlib::Absolutepath` Path to module sources. Multiple paths must be separated by colon. ##### `theme` Data type: `String` The default theme setting. Users may override this settings. Default value: 'Icinga' ##### `theme_disabled` Data type: `Boolean` Whether users can change themes or not. Default value: `false` ##### `manage_repo` Data type: `Boolean` When set to true this module will install the packages.icinga.com repository. Default value: `false` ##### `manage_package` Data type: `Boolean` If set to `false` packages aren't managed. Default value: `true` ##### `extra_packages` Data type: `Optional[Array[String]]` An array of packages to install additionally. Default value: `undef` ##### `import_schema` Data type: `Boolean` Import database scheme. Make sure you have an existing database if you use this option. Default value: `false` ##### `db_type` Data type: `Enum['mysql', 'pgsql']` Database type, can be either `mysql` or `pgsql`. This parameter is only used if `import_schema` is `true` or `config_backend` is `db`. Default value: 'mysql' ##### `db_host` Data type: `Stdlib::Host` Database hostname. This parameter is only used if `import_schema` is `true` or `config_backend` is `db`. Default value: 'localhost' ##### `db_port` Data type: `Stdlib::Port` Port of database host. This parameter is only used if `import_schema` is `true` or `config_backend` is `db`. Default value: 3306 ##### `db_name` Data type: `String` Database name. This parameter is only used if `import_schema` is `true` or `config_backend` is `db`. Default value: 'icingaweb2' ##### `db_username` Data type: `Optional[String]` Username for database access. This parameter is only used if `import_schema` is `true` or `config_backend` is `db`. Default value: `undef` ##### `db_password` Data type: `Optional[String]` Password for database access. This parameter is only used if `import_schema` is `true` or `config_backend` is `db`. Default value: `undef` ##### `config_backend` Data type: `Enum['ini', 'db']` The global Icinga Web 2 preferences can either be stored in a database or in ini files. This parameter can either be set to `db` or `ini`. Default value: 'ini' ##### `conf_user` Data type: `String` By default this module expects Apache2 on the server. You can change the owner of the config files with this parameter. ##### `conf_group` Data type: `String` Group membership of config files. ##### `default_domain` Data type: `Optional[String]` When using domain-aware authentication, you can set a default domain here. Default value: `undef` ##### `cookie_path` Data type: `Optional[Stdlib::Absolutepath]` Path to where cookies are stored. Default value: `undef` ### icingaweb2::globals This class loads the default parameters by doing a hiera lookup. * **Note** This parameters depend on the os plattform. Changes maybe will break the functional capability of the supported plattforms and versions. Please only do changes when you know what you're doing. #### Parameters The following parameters are available in the `icingaweb2::globals` class. ##### `package_name` Data type: `String` ##### `conf_dir` Data type: `Stdlib::Absolutepath` ##### `mysql_db_schema` Data type: `Stdlib::Absolutepath` ##### `pgsql_db_schema` Data type: `Stdlib::Absolutepath` ##### `gettext_package_name` Data type: `String` +##### `icingacli_bin` + +Data type: `Stdlib::Absolutepath` + + + ### icingaweb2::module::businessprocess Installs and enables the businessprocess module. * **Note** If you want to use `git` as `install_method`, the CLI `git` command has to be installed. You can manage it yourself as package resource or declare the package name in icingaweb2 class parameter `extra_packages`. #### Examples ##### ```puppet class { 'icingaweb2::module::businessprocess': git_revision => 'v2.1.0' } ``` #### Parameters The following parameters are available in the `icingaweb2::module::businessprocess` class. ##### `ensure` Data type: `Enum['absent', 'present']` Enable or disable module. Default value: 'present' ##### `git_repository` Data type: `String` Set a git repository URL. ##### `git_revision` Data type: `Optional[String]` Set either a branch or a tag name, eg. `master` or `v2.1.0`. Default value: `undef` ### icingaweb2::module::cube Installs and enables the cube module. * **Note** If you want to use `git` as `install_method`, the CLI `git` command has to be installed. You can manage it yourself as package resource or declare the package name in icingaweb2 class parameter `extra_packages`. #### Examples ##### ```puppet class { 'icingaweb2::module::cube': git_revision => 'v1.0.0' } ``` #### Parameters The following parameters are available in the `icingaweb2::module::cube` class. ##### `ensure` Data type: `Enum['absent', 'present']` Enable or disable module. Default value: 'present' ##### `git_repository` Data type: `String` Set a git repository URL. ##### `git_revision` Data type: `Optional[String]` Set either a branch or a tag name, eg. `master` or `v1.0.0`. Default value: `undef` ### icingaweb2::module::director Installs and configures the director module. * **Note** If you want to use `git` as `install_method`, the CLI `git` command has to be installed. You can manage it yourself as package resource or declare the package name in icingaweb2 class parameter `extra_packages`. #### Examples ##### ```puppet class { 'icingaweb2::module::director': git_revision => 'v1.7.2', db_host => 'localhost', db_name => 'director', db_username => 'director', db_password => 'supersecret', import_schema => true, kickstart => true, endpoint => 'puppet-icingaweb2.localdomain', api_username => 'director', api_password => 'supersecret', require => Mysql::Db['director'] } ``` #### Parameters The following parameters are available in the `icingaweb2::module::director` class. ##### `ensure` Data type: `Enum['absent', 'present']` Enable or disable module. Default value: 'present' ##### `git_repository` Data type: `String` Set a git repository URL. ##### `git_revision` Data type: `Optional[String]` Set either a branch or a tag name, eg. `master` or `v1.3.2`. Default value: `undef` ##### `db_type` Data type: `Enum['mysql', 'pgsql']` Type of your database. Either `mysql` or `pgsql`. Default value: 'mysql' ##### `db_host` -Data type: `Stdlib::Host` +Data type: `Optional[Stdlib::Host]` Hostname of the database. Default value: `undef` ##### `db_port` Data type: `Stdlib::Port` Port of the database. Default value: 3306 ##### `db_name` Data type: `Optional[String]` Name of the database. Default value: `undef` ##### `db_username` Data type: `Optional[String]` Username for DB connection. Default value: `undef` ##### `db_password` Data type: `Optional[String]` Password for DB connection. Default value: `undef` ##### `import_schema` Data type: `Boolean` Import database schema. Default value: `false` ##### `kickstart` Data type: `Boolean` Run kickstart command after database migration. This requires `import_schema` to be `true`. Default value: `false` ##### `endpoint` Data type: `Optional[String]` Endpoint object name of Icinga 2 API. This setting is only valid if `kickstart` is `true`. Default value: `undef` ##### `api_host` Data type: `Stdlib::Host` Icinga 2 API hostname. This setting is only valid if `kickstart` is `true`. Default value: 'localhost' ##### `api_port` Data type: `Stdlib::Port` Icinga 2 API port. This setting is only valid if `kickstart` is `true`. Default value: 5665 ##### `api_username` Data type: `Optional[String]` Icinga 2 API username. This setting is only valid if `kickstart` is `true`. Default value: `undef` ##### `api_password` Data type: `Optional[String]` Icinga 2 API password. This setting is only valid if `kickstart` is `true`. Default value: `undef` ##### `db_charset` Data type: `String` Default value: 'utf8' +### icingaweb2::module::director::service + +Installs and configures the director service. + +* **Note** Only systemd is supported by the Icinga Team and this module. + +#### Parameters + +The following parameters are available in the `icingaweb2::module::director::service` class. + +##### `ensure` + +Data type: `Stdlib::Ensure::Service` + +Whether the director service should be running. + +Default value: 'running' + +##### `enable` + +Data type: `Boolean` + +Enable or disable the service. + +Default value: `true` + +##### `user` + +Data type: `String` + +Specifies user to run director service daemon. + +Default value: 'icingadirector' + +##### `group` + +Data type: `String` + +Specifies primary group for user to run director service daemon. + +Default value: 'icingaweb2' + +##### `manage_user` + +Data type: `Boolean` + +Whether to manage the server user resource. + +Default value: `true` + ### icingaweb2::module::doc The doc module provides an interface to the Icinga 2 and Icinga Web 2 documentation. #### Parameters The following parameters are available in the `icingaweb2::module::doc` class. ##### `ensure` Data type: `Enum['absent', 'present']` Enable or disable module. Defaults to `present` Default value: 'present' ### icingaweb2::module::elasticsearch The Elasticsearch module displays events from data stored in Elasticsearch. * **Note** If you want to use `git` as `install_method`, the CLI `git` command has to be installed. You can manage it yourself as package resource or declare the package name in icingaweb2 class parameter `extra_packages`. #### Examples ##### ```puppet class { 'icingaweb2::module::elasticsearch': git_revision => 'v0.9.0', instances => { 'elastic' => { uri => 'http://localhost:9200', user => 'foo', password => 'bar', } }, eventtypes => { 'filebeat' => { instance => 'elastic', index => 'filebeat-*', filter => 'beat.hostname={host.name}', fields => 'input_type, source, message', } } } ``` #### Parameters The following parameters are available in the `icingaweb2::module::elasticsearch` class. ##### `ensure` Data type: `Enum['absent', 'present']` Enable or disable module. Default value: 'present' ##### `git_repository` Data type: `String` Set a git repository URL. ##### `git_revision` Data type: `Optional[String]` Set either a branch or a tag name, eg. `master` or `v1.3.2`. Default value: `undef` ##### `instances` Data type: `Optional[Hash]` A hash that configures one or more Elasticsearch instances that this module connects to. The defined type `icingaweb2::module::elasticsearch::instance` is used to create the instance configuration. Default value: `undef` ##### `eventtypes` Data type: `Optional[Hash]` A hash oft ypes of events that should be displayed. Event types are always connected to instances. The defined type `icingaweb2::module::elasticsearch::eventtype` is used to create the event types. Default value: `undef` ### icingaweb2::module::fileshipper @example: class { 'icingaweb2::module::fileshipper': git_revision => 'v1.0.1', base_directories => { temp => '/var/lib/fileshipper' }, directories => { 'test' => { 'source' => '/var/lib/fileshipper/source', 'target' => '/var/lib/fileshipper/target', } } } * **Note** If you want to use `git` as `install_method`, the CLI `git` command has to be installed. You can manage it yourself as package resource or declare the package name in icingaweb2 class parameter `extra_packages`. #### Parameters The following parameters are available in the `icingaweb2::module::fileshipper` class. ##### `ensure` Data type: `Enum['absent', 'present']` Enables or disables module. Default value: 'present' ##### `git_repository` Data type: `String` Set a git repository URL. ##### `git_revision` Data type: `Optional[String]` Set either a branch or a tag name, eg. `master` or `v1.3.2`. Default value: `undef` ##### `base_directories` Data type: `Hash` Hash of base directories. These directories can later be selected in the import source (Director). Default value: {} ##### `directories` Data type: `Hash` Deploy plain Icinga 2 configuration files through the Director to your Icinga 2 master. Default value: {} ### icingaweb2::module::generictts Installs and enables the generictts module. * **Note** If you want to use `git` as `install_method`, the CLI `git` command has to be installed. You can manage it yourself as package resource or declare the package name in icingaweb2 class parameter `extra_packages`. #### Examples ##### ```puppet class { 'icingaweb2::module::generictts': git_revision => 'v2.0.0', ticketsystems => { 'my-ticket-system' => { pattern => '/#([0-9]{4,6})/', url => 'https://my.ticket.system/tickets/id=$1', }, }, } ``` #### Parameters The following parameters are available in the `icingaweb2::module::generictts` class. ##### `ensure` Data type: `Enum['absent', 'present']` Enable or disable module. Default value: 'present' ##### `git_repository` Data type: `String` Set a git repository URL. ##### `git_revision` Data type: `Optional[String]` Set either a branch or a tag name, eg. `master` or `v2.0.0`. Default value: `undef` ##### `ticketsystems` Data type: `Hash` A hash of ticketsystems. The hash expects a `patten` and a `url` for each ticketsystem. The regex pattern is to match the ticket ID, eg. `/#([0-9]{4,6})/`. Place the ticket ID in the URL, eg. `https://my.ticket.system/tickets/id=$1`. Default value: {} ### icingaweb2::module::graphite The Graphite module draws graphs out of time series data stored in Graphite. * **Note** If you want to use `git` as `install_method`, the CLI `git` command has to be installed. You can manage it yourself as package resource or declare the package name in icingaweb2 class parameter `extra_packages`. #### Examples ##### ```puppet class { 'icingaweb2::module::graphite': git_revision => 'v0.9.0', url => 'https://localhost:8080' } ``` #### Parameters The following parameters are available in the `icingaweb2::module::graphite` class. ##### `ensure` Data type: `Enum['absent', 'present']` Enables or disables module. Default value: 'present' ##### `git_repository` Data type: `String` Set a git repository URL. ##### `git_revision` Data type: `Optional[String]` Set either a branch or a tag name, eg. `master` or `v1.3.2`. Default value: `undef` ##### `url` Data type: `Optional[String]` URL to your Graphite Web/API. Default value: `undef` ##### `user` Data type: `Optional[String]` A user with access to your Graphite Web via HTTP basic authentication. Default value: `undef` ##### `password` Data type: `Optional[String]` The users password. Default value: `undef` ##### `graphite_writer_host_name_template` Data type: `Optional[String]` The value of your Icinga 2 GraphiteWriter's attribute `host_name_template` (if specified). Default value: `undef` ##### `graphite_writer_service_name_template` Data type: `Optional[String]` The value of your icinga 2 GraphiteWriter's attribute `service_name_template` (if specified). Default value: `undef` ### icingaweb2::module::incubator Installs and enables the incubator module. * **Note** If you want to use `git` as `install_method`, the CLI `git` command has to be installed. You can manage it yourself as package resource or declare the package name in icingaweb2 class parameter `extra_packages`. #### Parameters The following parameters are available in the `icingaweb2::module::incubator` class. ##### `ensure` Data type: `Enum['absent', 'present']` Enable or disable module. Defaults to `present` Default value: 'present' ##### `git_repository` Data type: `String` Set a git repository URL. Defaults to github. ##### `git_revision` Data type: `String` Set either a branch or a tag name, eg. `stable/0.7.0` or `v0.7.0`. ### icingaweb2::module::ipl Installs and enables the ipl module. * **Note** If you want to use `git` as `install_method`, the CLI `git` command has to be installed. You can manage it yourself as package resource or declare the package name in icingaweb2 class parameter `extra_packages`. #### Parameters The following parameters are available in the `icingaweb2::module::ipl` class. ##### `ensure` Data type: `Enum['absent', 'present']` Enable or disable module. Default value: 'present' ##### `git_repository` Data type: `String` Set a git repository URL. ##### `git_revision` Data type: `String` Set either a branch or a tag name, eg. `stable/0.7.0` or `v0.7.0`. ### icingaweb2::module::monitoring Requirements: * IDO feature in Icinga 2 (MySQL or PostgreSQL) * `ApiUser` object in Icinga 2 with proper permissions class {'icingaweb2::module::monitoring': ido_host => 'localhost', ido_db_type => 'mysql', ido_db_name => 'icinga2', ido_db_username => 'icinga2', ido_db_password => 'supersecret', commandtransports => { icinga2 => { transport => 'api', username => 'icingaweb2', password => 'supersecret', } } } * **Note** At first have a look at the [Monitoring module documentation](https://www.icinga.com/docs/icingaweb2/latest/modules/monitoring/doc/01-About/). #### Examples ##### This module is mandatory for almost every setup. It connects your Icinga Web interface to the Icinga 2 core. Current and history information are queried through the IDO database. Actions such as `Check Now`, `Set Downtime` or `Acknowledge` are send to the Icinga 2 API. ```puppet ``` #### Parameters The following parameters are available in the `icingaweb2::module::monitoring` class. ##### `ensure` Data type: `Enum['absent', 'present']` Enable or disable module. Default value: 'present' ##### `protected_customvars` Data type: `Variant[String, Array[String]]` Custom variables in Icinga 2 may contain sensible information. Set patterns for custom variables that should be hidden in the web interface. Default value: ['*pw*', '*pass*', 'community'] ##### `ido_type` Data type: `Enum['mysql', 'pgsql']` Type of your IDO database. Either `mysql` or `pgsql`. Default value: 'mysql' ##### `ido_host` Data type: `Optional[Stdlib::Host]` Hostname of the IDO database. Default value: `undef` ##### `ido_port` Data type: `Stdlib::Port` Port of the IDO database. Default value: 3306 ##### `ido_db_name` Data type: `Optional[String]` Name of the IDO database. Default value: `undef` ##### `ido_db_username` Data type: `Optional[String]` Username for IDO DB connection. Default value: `undef` ##### `ido_db_password` Data type: `Optional[String]` Password for IDO DB connection. Default value: `undef` ##### `ido_db_charset` Data type: `Optional[String]` The character set to use for the database connection. Default value: `undef` ##### `commandtransports` Data type: `Hash` A hash of command transports. Default value: {} ### icingaweb2::module::puppetdb Installs and configures the puppetdb module. * **Note** If you want to use `git` as `install_method`, the CLI `git` command has to be installed. You can manage it yourself as package resource or declare the package name in icingaweb2 class parameter `extra_packages`. #### Examples ##### Set up the PuppetDB module and configure two custom SSL keys: ```puppet $certificates = { 'pupdb1' => { :ssl_key => '-----BEGIN RSA PRIVATE KEY----- abc...', :ssl_cacert => '-----BEGIN RSA PRIVATE KEY----- def...', }, 'pupdb2' => { :ssl_key => '-----BEGIN RSA PRIVATE KEY----- zyx...', :ssl_cacert => '-----BEGIN RSA PRIVATE KEY----- wvur...', }, } class { '::icingaweb2::module::puppetdb': git_revision => 'master', ssl => 'none', certificates => $certificates, } ``` ##### Set up the PuppetDB module and configure the hosts SSL key to connect to the PuppetDB host: ```puppet class {'::icingaweb2::module::puppetdb': git_revision => 'master', ssl => 'puppet', host => 'puppetdb.example.com', } ``` #### Parameters The following parameters are available in the `icingaweb2::module::puppetdb` class. ##### `ensure` Data type: `Enum['absent', 'present']` Enable or disable module. Default value: 'present' ##### `git_repository` Data type: `String` Set a git repository URL. ##### `git_revision` Data type: `Optional[String]` Set either a branch or a tag name, eg. `master` or `v1.3.2`. Default value: `undef` ##### `ssl` Data type: `Enum['none', 'puppet']` How to set up ssl certificates. To copy certificates from the local puppet installation, use `puppet`. Default value: 'none' ##### `host` Data type: `Optional[Stdlib::Host]` Hostname of the server where PuppetDB is running. The `ssl` parameter needs to be set to `puppet`. Default value: `undef` ##### `certificates` Data type: `Hash` Hash with icingaweb2::module::puppetdb::certificate resources. Default value: {} ### icingaweb2::module::reactbundle Installs and enables the reactbundle module. * **Note** If you want to use `git` as `install_method`, the CLI `git` command has to be installed. You can manage it yourself as package resource or declare the package name in icingaweb2 class parameter `extra_packages`. #### Parameters The following parameters are available in the `icingaweb2::module::reactbundle` class. ##### `ensure` Data type: `Enum['absent', 'present']` Enable or disable module. Default value: 'present' ##### `git_repository` Data type: `String` Set a git repository URL. ##### `git_revision` Data type: `String` Set either a branch or a tag name, eg. `stable/0.7.0` or `v0.7.0`. ### icingaweb2::module::translation Installs and configures the translation module. #### Parameters The following parameters are available in the `icingaweb2::module::translation` class. ##### `ensure` Data type: `Enum['absent', 'present']` Enable or disable module. Default value: 'present' ### icingaweb2::module::vsphere The vSphere module extends the Director. It provides import sources for virtual machines and physical hosts from vSphere. * **Note** If you want to use `git` as `install_method`, the CLI `git` command has to be installed. You can manage it yourself as package resource or declare the package name in icingaweb2 class parameter `extra_packages`. #### Parameters The following parameters are available in the `icingaweb2::module::vsphere` class. ##### `ensure` Data type: `Enum['absent', 'present']` Enable or disable module. Default value: 'present' ##### `git_repository` Data type: `String` Set a git repository URL. ##### `git_revision` Data type: `Optional[String]` Set either a branch or a tag name, eg. `stable/0.7.0` or `v0.7.0`. Default value: `undef` ## Defined types ### icingaweb2::config::authmethod Manage Icinga Web 2 authentication methods. Auth methods may be chained by setting proper ordering. #### Examples ##### Create an authentication method (db) and reference to a resource: ```puppet icingaweb2::config::authmethod { 'db-auth': backend => 'db', resource => 'my-sql', order => 20, } ``` ##### Create a LDAP authmethod: ```puppet icingaweb2::config::authmethod { 'ldap-auth': backend => 'ldap', resource => 'my-ldap', ldap_user_class => 'user', ldap_filter => '(memberof:1.2.840.113556.1.4.1941:=CN=monitoring,OU=groups,DC=icinga,DC=com)', ldap_user_name_attribute => 'userPrincipalName', order => '05', } ``` #### Parameters The following parameters are available in the `icingaweb2::config::authmethod` defined type. ##### `backend` Data type: `Enum['external', 'ldap', 'msldap', 'db']` Select between 'external', 'ldap', 'msldap' or 'db'. Each backend may require other settings. Default value: `undef` ##### `resource` Data type: `Optional[String]` The name of the resource defined in resources.ini. Default value: `undef` ##### `ldap_user_class` Data type: `Optional[String]` -LDAP user class. Only valid if `backend` is `ldap`. +LDAP user class. Only valid if `backend` is `ldap` or `msldap`. Default value: `undef` ##### `ldap_user_name_attribute` Data type: `Optional[String]` -LDAP attribute which contains the username. Only valid if `backend` is `ldap`. +LDAP attribute which contains the username. Only valid if `backend` is `ldap` or `msldap`. Default value: `undef` ##### `ldap_filter` Data type: `Optional[String]` -LDAP search filter. Only valid if `backend` is `ldap`. +LDAP search filter. Only valid if `backend` is `ldap` or `msladap`. Default value: `undef` ##### `ldap_base_dn` Data type: `Optional[String]` -LDAP base DN. Only valid if `backend` is `ldap`. +LDAP base DN. Only valid if `backend` is `ldap` or `msldap`. Default value: `undef` ##### `domain` Data type: `Optional[String]` Domain for domain-aware authentication Default value: `undef` ##### `order` Data type: `Variant[String, Integer]` Multiple authentication methods can be chained. The order of entries in the authentication configuration determines the order of the authentication methods. Default value: '01' ### icingaweb2::config::groupbackend Groups of users can be stored either in a database, LDAP or ActiveDirectory. This defined type configures backends that store groups. #### Examples ##### A group backend for groups stored in LDAP: ```puppet icingaweb2::config::groupbackend { 'ldap-groups': backend => 'ldap', resource => 'my-ldap', ldap_group_class => 'group', ldap_group_name_attribute => 'cn', ldap_group_member_attribute => 'member', ldap_base_dn => 'ou=groups,dc=icinga,dc=com', domain => 'icinga.com', } ``` ##### If you have imported the database schema (parameter `import_schema`), this backend was also created automatically: ```puppet icingaweb2::config::groupbackend { 'mysql-backend': backend => 'db', resource => 'my-sql', } ``` #### Parameters The following parameters are available in the `icingaweb2::config::groupbackend` defined type. ##### `group_name` Data type: `String` Name of the resources. Resources are referenced by their name in other configuration sections. Default value: $title ##### `backend` Data type: `Enum['db', 'ldap', 'msldap']` Type of backend. Valide values are: `db`, `ldap` and `msldap`. Each backend supports different settings, see the parameters for detailed information. Default value: `undef` ##### `resource` Data type: `String` The resource used to connect to the backend. The resource contains connection information. Default value: `undef` ##### `ldap_user_backend` Data type: `Optional[String]` A group backend can be connected with an authentication method. This parameter references the auth method. Only valid with backend `ldap` or `msldap`. Default value: `undef` ##### `ldap_group_class` Data type: `Optional[String]` Class used to identify group objects. Only valid with backend `ldap`. Default value: `undef` ##### `ldap_group_filter` Data type: `Optional[String]` Use a LDAP filter to receive only certain groups. Only valid with backend `ldap` or `msldap`. Default value: `undef` ##### `ldap_group_name_attribute` Data type: `Optional[String]` The group name attribute. Only valid with backend `ldap`. Default value: `undef` ##### `ldap_group_member_attribute` Data type: `Optional[String]` The group member attribute. Only valid with backend `ldap`. Default value: `undef` ##### `ldap_base_dn` Data type: `Optional[String]` Base DN that is searched for groups. Only valid with backend `ldap` with `msldap`. Default value: `undef` ##### `ldap_nested_group_search` Data type: `Optional[Boolean]` Search for groups in groups. Only valid with backend `msldap`. Default value: `undef` ##### `domain` Data type: `Optional[String]` Domain for domain-aware authentication. Default value: `undef` ##### `order` Data type: `Variant[String, Integer]` Multiple authentication methods can be chained. The order of entries in the authentication configuration determines the order of the authentication methods. Default value: '01' ### icingaweb2::config::resource Create and remove Icinga Web 2 resources. Resources may be referenced in other configuration sections. #### Examples ##### Create a MySQL DB resource: ```puppet icingaweb2::config::resource{ 'my-sql': type => 'db', db_type => 'mysql', host => 'localhost', port => '3306', db_name => 'icingaweb2', db_username => 'icingaweb2', db_password => 'supersecret', } ``` ##### Create a LDAP resource: ```puppet icingaweb2::config::resource{ 'my-ldap': type => 'ldap', host => 'localhost', port => 389, ldap_root_dn => 'ou=users,dc=icinga,dc=com', ldap_bind_dn => 'cn=icingaweb2,ou=users,dc=icinga,dc=com', ldap_bind_pw => 'supersecret', } ``` #### Parameters The following parameters are available in the `icingaweb2::config::resource` defined type. ##### `resource_name` Data type: `String` Name of the resources. Resources are referenced by their name in other configuration sections. Default value: $title ##### `type` Data type: `Enum['db', 'ldap']` Supported resource types are `db` and `ldap`. ##### `host` -Data type: `Optional[Stdlib::Host]` +Data type: `Optional[String]` Connect to the database or ldap server on the given host. For using unix domain sockets, specify 'localhost' for MySQL and the path to the unix domain socket directory for PostgreSQL. When using the 'ldap' type you can also provide multiple hosts separated by a space. Default value: `undef` ##### `port` Data type: `Optional[Stdlib::Port]` Port number to use. Default value: `undef` ##### `db_type` Data type: `Optional[Enum['mysql', 'pgsql']]` Supported DB types are `mysql` and `pgsql`. Default value: `undef` ##### `db_name` Data type: `Optional[String]` The database to use. Only valid if `type` is `db`. Default value: `undef` ##### `db_username` Data type: `Optional[String]` The username to use when connecting to the server. Only valid if `type` is `db`. Default value: `undef` ##### `db_password` Data type: `Optional[String]` The password to use when connecting to the server. Only valid if `type` is `db`. Default value: `undef` ##### `db_charset` Data type: `Optional[String]` The character set to use for the database connection. Only valid if `type` is `db`. Default value: `undef` ##### `ldap_root_dn` Data type: `Optional[String]` Root object of the tree, e.g. 'ou=people,dc=icinga,dc=com'. Only valid if `type` is `ldap`. Default value: `undef` ##### `ldap_bind_dn` Data type: `Optional[String]` The user to use when connecting to the server. Only valid if `type` is `ldap`. Default value: `undef` ##### `ldap_bind_pw` Data type: `Optional[String]` The password to use when connecting to the server. Only valid if `type` is `ldap`. Default value: `undef` ##### `ldap_encryption` Data type: `Optional[Enum['none', 'starttls', 'ldaps']]` Type of encryption to use: none (default), starttls, ldaps. Only valid if `type` is `ldap`. Default value: 'none' ##### `ldap_timeout` Data type: `Integer` Timeout for the ldap connection. Default value: 5 ### icingaweb2::config::role Roles define a set of permissions that may be applied to users or groups. * **Note** Availble permissions in module monitoring: | Description | Value | |-------------|-------| | Allow everything | `*` | | Allow to share navigation items | `application/share/navigation` | | Allow to adjust in the preferences whether to show stacktraces | `application/stacktraces` | | Allow to view the application log | `application/log` | | Grant admin permissions, e.g. manage announcements | `admin` | | Allow config access | `config/*` | | Allow access to module doc | `module/doc` | | Allow access to module monitoring | `module/monitoring` | | Allow all commands | `monitoring/command/*` | | Allow scheduling host and service checks | `monitoring/command/schedule-check` | | Allow acknowledging host and service problems | `monitoring/command/acknowledge-problem` | | Allow removing problem acknowledgements | `monitoring/command/remove-acknowledgement` | | Allow adding and deleting host and service comments | `monitoring/command/comment/*` | | Allow commenting on hosts and services | `monitoring/command/comment/add` | | Allow deleting host and service comments | `monitoring/command/comment/delete` | | Allow scheduling and deleting host and service downtimes | `monitoring/command/downtime/*` | | Allow scheduling host and service downtimes | `monitoring/command/downtime/schedule` | | Allow deleting host and service downtimes | `monitoring/command/downtime/delete` | | Allow processing host and service check results | `monitoring/command/process-check-result` | | Allow processing commands for toggling features on an instance-wide basis | `monitoring/command/feature/instance` | | Allow processing commands for toggling features on host and service objects | `monitoring/command/feature/object/*`) | | Allow processing commands for toggling active checks on host and service objects | `monitoring/command/feature/object/active-checks` | | Allow processing commands for toggling passive checks on host and service objects | `monitoring/command/feature/object/passive-checks` | | Allow processing commands for toggling notifications on host and service objects | `monitoring/command/feature/object/notifications` | | Allow processing commands for toggling event handlers on host and service objects | `monitoring/command/feature/object/event-handler` | | Allow processing commands for toggling flap detection on host and service objects | `monitoring/command/feature/object/flap-detection` | | Allow sending custom notifications for hosts and services | `monitoring/command/send-custom-notification` | | Allow access to module setup | `module/setup` | | Allow access to module test | `module/test` | | Allow access to module translation | `module/translation` | #### Examples ##### Create role that allows only hosts beginning with `linux-*`: ```puppet icingaweb2::config::role{ 'linux-user': groups => 'linuxer', permissions => '*', filters => { 'monitoring/filter/objects' => 'host_name=linux-*' } } ``` ##### Create role that allows a user to see only hosts beginning with `linux-*`: ```puppet icingaweb2::config::role{'linux-user': users => 'bob, pete', permissions => '*', filters => { 'monitoring/filter/objects' => 'host_name=linux-*', } } ``` #### Parameters The following parameters are available in the `icingaweb2::config::role` defined type. ##### `role_name` Data type: `String` Name of the role. Default value: $title ##### `users` Data type: `Optional[String]` Comma separated list of users this role applies to. Default value: `undef` ##### `groups` Data type: `Optional[String]` Comma separated list of groups this role applies to. Default value: `undef` ##### `permissions` Data type: `Optional[String]` Comma separated lsit of permissions. Each module may add it's own permissions. Examples are - Allow everything: '*' - Allow config access: 'config/*' - Allow access do module monitoring: 'module/monitoring' - Allow scheduling checks: 'monitoring/command/schedule-checks' - Grant admin permissions: 'admin' Default value: `undef` ##### `filters` Data type: `Hash` Hash of filters. Modules may add new filter keys, some sample keys are: - application/share/users - application/share/groups - monitoring/filter/objects - monitoring/blacklist/properties A string value is expected for each used key. For example: - monitoring/filter/objects = "host_name!=*win*" Default value: {} ### icingaweb2::inisection Manage settings in INI configuration files. #### Examples ##### Create the configuration file and set two settings for the section `global`: ```puppet include icingawebeb2 icingaweb2::inisection { '/path/to/config.ini': settings => { 'global' => { 'setting1' => 'value', 'setting2' => 'value', }, }, } ``` #### Parameters The following parameters are available in the `icingaweb2::inisection` defined type. ##### `target` Data type: `Stdlib::Absolutepath` Absolute path to the configuration file. ##### `section_name` Data type: `String` Name of the target section. Settings are set under [$section_name] Default value: $title ##### `settings` Data type: `Hash` A hash of settings and their settings. Single settings may be set to absent. Default value: {} ##### `order` Data type: `Variant[String, Integer]` Ordering of the INI section within a file. Defaults to `01` Default value: '01' ### icingaweb2::module Download, enable and configure Icinga Web 2 modules. * **Note** If you want to use `git` as `install_method`, the CLI `git` command has to be installed. You can manage it yourself as package resource or declare the package name in icingaweb2 class parameter `extra_packages`. #### Examples ##### ```puppet $conf_dir = $::icingaweb2::globals::conf_dir $module_conf_dir = "${conf_dir}/modules/mymodule" $settings = { 'section1' => { 'target' => "${module_conf_dir}/config1.ini", 'settings' => { 'setting1' => 'value1', 'setting2' => 'value2', } }, 'section2' => { 'target' => "${module_conf_dir}/config2.ini", 'settings' => { 'setting3' => 'value3', 'setting4' => 'value4', } } } ``` #### Parameters The following parameters are available in the `icingaweb2::module` defined type. ##### `ensure` Data type: `Enum['absent', 'present']` Enable or disable module. Default value: 'present' ##### `module` Data type: `String` Name of the module. Default value: $title ##### `module_dir` Data type: `Stdlib::Absolutepath` Target directory of the module. Default value: "${::icingaweb2::module_path}/${title}" ##### `install_method` Data type: `Enum['git', 'none', 'package']` Install methods are `git`, `package` and `none` is supported as installation method. Defaults to `git` Default value: 'git' ##### `git_revision` Data type: `String` Tag or branch of the git repository. This setting is only valid in combination with the installation method `git`. Default value: 'master' ##### `package_name` Data type: `Optional[String]` Package name of the module. This setting is only valid in combination with the installation method `package`. Default value: `undef` ##### `settings` Data type: `Hash` A hash with the module settings. Multiple configuration files with ini sections can be configured with this hash. The `module_name` should be used as target directory for the configuration files. Default value: {} ##### `git_repository` Data type: `Optional[String]` Default value: `undef` diff --git a/RELEASE.md b/RELEASE.md index 51ebbcc..8448553 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,61 +1,66 @@ # Release Workflow Before submitting a new release, make sure all relevant pull requests and local branches have been merged to the `master` branch. All tests must pass before a release is tagged. ## 1. AUTHORS Update the [AUTHORS] and [.mailmap] file ``` bash git checkout master git log --use-mailmap | grep ^Author: | cut -f2- -d' ' | sort | uniq > AUTHORS git commit -am "Update AUTHORS" ``` ## 2. Changelog Install [github-changelog-generator] ```bash gem install github_changelog_generator ``` Generate [CHANGELOG.md] ```bash github_changelog_generator -t --future-release=v2.3.1 ``` -## 3. Version +## 3. References [REFERENCE.md] +```bash +puppet strings generate --format markdown --out ./REFERENCE.md +``` + +## 4. Version Version numbers are incremented regarding the [SemVer 1.0.0] specification. Update the version number in `metadata.json`. -## 4. Git Tag +## 5. Git Tag Commit all changes to the `master` branch ``` bash VERSION=2.3.1 git commit -v -a -m "Release version $VERSION" git push ``` Tag the release ``` bash git tag -m "Version $VERSION" "v$VERSION" ``` Push tags ``` bash git push --tags ``` ## Puppet Forge The module is uploaded automatically to Puppet Forge by TravisCI when a new tag is set. [github-changelog-generator]: https://github.com/skywinder/github-changelog-generator [SemVer 1.0.0]: http://semver.org/spec/v1.0.0.html [CHANGELOG.md]: CHANGELOG.md [AUTHORS]: AUTHORS [.mailmap]: .mailmap [forge.puppet.com]: https://forge.puppet.com/ diff --git a/manifests/module/director.pp b/manifests/module/director.pp index 7da210b..b2de145 100644 --- a/manifests/module/director.pp +++ b/manifests/module/director.pp @@ -1,163 +1,163 @@ # @summary # Installs and configures the director module. # # @note If you want to use `git` as `install_method`, the CLI `git` command has to be installed. You can manage it yourself as package resource or declare the package name in icingaweb2 class parameter `extra_packages`. # # @param [Enum['absent', 'present']] ensure # Enable or disable module. # # @param [String] git_repository # Set a git repository URL. # # @param [Optional[String]] git_revision # Set either a branch or a tag name, eg. `master` or `v1.3.2`. # # @param [Enum['mysql', 'pgsql']] db_type # Type of your database. Either `mysql` or `pgsql`. # -# @param [Stdlib::Host] db_host +# @param [Optional[Stdlib::Host]] db_host # Hostname of the database. # # @param [Stdlib::Port] db_port # Port of the database. # # @param [Optional[String]] db_name # Name of the database. # # @param [Optional[String]] db_username # Username for DB connection. # # @param [Optional[String]] db_password # Password for DB connection. # # @param [Boolean] import_schema # Import database schema. # # @param [Boolean] kickstart # Run kickstart command after database migration. This requires `import_schema` to be `true`. # # @param [Optional[String]] endpoint # Endpoint object name of Icinga 2 API. This setting is only valid if `kickstart` is `true`. # # @param [Stdlib::Host] api_host # Icinga 2 API hostname. This setting is only valid if `kickstart` is `true`. # # @param [Stdlib::Port] api_port # Icinga 2 API port. This setting is only valid if `kickstart` is `true`. # # @param [Optional[String]] api_username # Icinga 2 API username. This setting is only valid if `kickstart` is `true`. # # @param [Optional[String]] api_password # Icinga 2 API password. This setting is only valid if `kickstart` is `true`. # # @note Please checkout the [Director module documentation](https://www.icinga.com/docs/director/latest/) for requirements. # # @example # class { 'icingaweb2::module::director': # git_revision => 'v1.7.2', # db_host => 'localhost', # db_name => 'director', # db_username => 'director', # db_password => 'supersecret', # import_schema => true, # kickstart => true, # endpoint => 'puppet-icingaweb2.localdomain', # api_username => 'director', # api_password => 'supersecret', # require => Mysql::Db['director'] # } # class icingaweb2::module::director( String $git_repository, Enum['absent', 'present'] $ensure = 'present', Optional[String] $git_revision = undef, Enum['mysql', 'pgsql'] $db_type = 'mysql', Optional[Stdlib::Host] $db_host = undef, Stdlib::Port $db_port = 3306, Optional[String] $db_name = undef, Optional[String] $db_username = undef, Optional[String] $db_password = undef, String $db_charset = 'utf8', Boolean $import_schema = false, Boolean $kickstart = false, Optional[String] $endpoint = undef, Stdlib::Host $api_host = 'localhost', Stdlib::Port $api_port = 5665, Optional[String] $api_username = undef, Optional[String] $api_password = undef, ) { $conf_dir = $::icingaweb2::globals::conf_dir $icingacli_bin = $::icingaweb2::globals::icingacli_bin $module_conf_dir = "${conf_dir}/modules/director" Exec { user => 'root', path => $::path, } icingaweb2::config::resource { 'icingaweb2-module-director': type => 'db', db_type => $db_type, host => $db_host, port => $db_port, db_name => $db_name, db_username => $db_username, db_password => $db_password, db_charset => $db_charset, } $db_settings = { 'module-director-db' => { 'section_name' => 'db', 'target' => "${module_conf_dir}/config.ini", 'settings' => { 'resource' => 'icingaweb2-module-director' } } } if $import_schema { ensure_packages(['icingacli'], { 'ensure' => 'present' }) exec { 'director-migration': command => "${icingacli_bin} director migration run", onlyif => "${icingacli_bin} director migration pending", require => [ Package['icingacli'], Icingaweb2::Module['director'] ] } if $kickstart { $kickstart_settings = { 'module-director-config' => { 'section_name' => 'config', 'target' => "${module_conf_dir}/kickstart.ini", 'settings' => { 'endpoint' => $endpoint, 'host' => $api_host, 'port' => $api_port, 'username' => $api_username, 'password' => $api_password, } } } exec { 'director-kickstart': command => "${icingacli_bin} director kickstart run", onlyif => "${icingacli_bin} director kickstart required", require => Exec['director-migration'] } } else { $kickstart_settings = {} } } else { $kickstart_settings = {} } icingaweb2::module {'director': ensure => $ensure, git_repository => $git_repository, git_revision => $git_revision, settings => merge($db_settings, $kickstart_settings), } }