diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..12ed4ff --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,6 @@ +FROM puppet/pdk:latest + +# [Optional] Uncomment this section to install additional packages. +# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ +# && apt-get -y install --no-install-recommends + diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..f1a55dc --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,23 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: +// https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/puppet +{ + "name": "Puppet Development Kit (Community)", + "dockerFile": "Dockerfile", + + // Set *default* container specific settings.json values on container create. + "settings": { + "terminal.integrated.shell.linux": "/bin/bash" + }, + + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "puppet.puppet-vscode", + "rebornix.Ruby" + ] + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "pdk --version", +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 66c7360..6df0f21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,352 +1,369 @@ # Change Log +## [v3.2.0](https://github.com/icinga/puppet-icingaweb2/tree/v3.2.0) (2021-12-03) +[Full Changelog](https://github.com/icinga/puppet-icingaweb2/compare/v3.1.0...v3.2.0) + +**Implemented enhancements:** + +- Add import\_schema feature to vspheredb module [\#304](https://github.com/Icinga/puppet-icingaweb2/issues/304) +- director module manage service unit file only if no package is used [\#303](https://github.com/Icinga/puppet-icingaweb2/issues/303) +- vspheredb module manage service unit file only if no package is used [\#302](https://github.com/Icinga/puppet-icingaweb2/issues/302) +- Add code to set the icingaadmin initial [\#282](https://github.com/Icinga/puppet-icingaweb2/issues/282) +- switch from camptocamp/systemd to puppet/systemd [\#298](https://github.com/Icinga/puppet-icingaweb2/pull/298) ([saz](https://github.com/saz)) +- Update dependency requirement to minimum version [\#295](https://github.com/Icinga/puppet-icingaweb2/pull/295) ([Rubueno](https://github.com/Rubueno)) +- changed stdlib max version from \<8.0.0 to \<9.0.0 [\#294](https://github.com/Icinga/puppet-icingaweb2/pull/294) ([zilchms](https://github.com/zilchms)) + +**Merged pull requests:** + +- Typo fix [\#296](https://github.com/Icinga/puppet-icingaweb2/pull/296) ([Rubueno](https://github.com/Rubueno)) + ## [v3.1.0](https://github.com/icinga/puppet-icingaweb2/tree/v3.1.0) (2021-06-18) [Full Changelog](https://github.com/icinga/puppet-icingaweb2/compare/v3.0.1...v3.1.0) **Implemented enhancements:** - Add vpsheredb module [\#276](https://github.com/Icinga/puppet-icingaweb2/pull/276) ([JonasVerhofste](https://github.com/JonasVerhofste)) - option to install modules as package [\#244](https://github.com/Icinga/puppet-icingaweb2/pull/244) ([pulecp](https://github.com/pulecp)) **Fixed bugs:** - Wrong path of config.ini in module director [\#290](https://github.com/Icinga/puppet-icingaweb2/issues/290) **Closed issues:** - Apache SSL configuration [\#279](https://github.com/Icinga/puppet-icingaweb2/issues/279) **Merged pull requests:** - Update dependencies [\#289](https://github.com/Icinga/puppet-icingaweb2/pull/289) ([saz](https://github.com/saz)) - Fix typo in example [\#287](https://github.com/Icinga/puppet-icingaweb2/pull/287) ([mj](https://github.com/mj)) ## [v3.0.1](https://github.com/icinga/puppet-icingaweb2/tree/v3.0.1) (2020-11-16) [Full Changelog](https://github.com/icinga/puppet-icingaweb2/compare/v3.0.0...v3.0.1) **Fixed bugs:** - add mssql, oci, oracle, ibmi and sqlite as new db\_types for resources [\#278](https://github.com/Icinga/puppet-icingaweb2/pull/278) ([lbetz](https://github.com/lbetz)) ## [v3.0.0](https://github.com/icinga/puppet-icingaweb2/tree/v3.0.0) (2020-10-14) [Full Changelog](https://github.com/icinga/puppet-icingaweb2/compare/v2.4.1...v3.0.0) **Implemented enhancements:** - Add new param manage\_repos to replace manage\_repo in the future [\#274](https://github.com/Icinga/puppet-icingaweb2/issues/274) - Replace class repo with new class from module icinga [\#260](https://github.com/Icinga/puppet-icingaweb2/issues/260) ## [v2.4.1](https://github.com/icinga/puppet-icingaweb2/tree/v2.4.1) (2020-08-31) [Full Changelog](https://github.com/icinga/puppet-icingaweb2/compare/v2.4.0...v2.4.1) **Fixed bugs:** - Release defined resource commandtransport from private [\#264](https://github.com/Icinga/puppet-icingaweb2/issues/264) - fix icingaweb2::module::director::service systemd::unit\_file param name error [\#273](https://github.com/Icinga/puppet-icingaweb2/pull/273) ([jhoblitt](https://github.com/jhoblitt)) - fix travis-ci failures [\#270](https://github.com/Icinga/puppet-icingaweb2/pull/270) ([jhoblitt](https://github.com/jhoblitt)) **Closed issues:** - icingaweb2::module::director::service systemd::unit\_file param name error [\#272](https://github.com/Icinga/puppet-icingaweb2/issues/272) - travis-ci rubocop check is failing on master [\#271](https://github.com/Icinga/puppet-icingaweb2/issues/271) - travis-ci `check:git\_ignore` check is failing on master [\#269](https://github.com/Icinga/puppet-icingaweb2/issues/269) - manage business process source files [\#265](https://github.com/Icinga/puppet-icingaweb2/issues/265) - Update Package version [\#262](https://github.com/Icinga/puppet-icingaweb2/issues/262) ## [v2.4.0](https://github.com/icinga/puppet-icingaweb2/tree/v2.4.0) (2020-07-06) [Full Changelog](https://github.com/icinga/puppet-icingaweb2/compare/v2.3.1...v2.4.0) **Implemented enhancements:** - add pdk support [\#259](https://github.com/Icinga/puppet-icingaweb2/issues/259) - rework documentation [\#258](https://github.com/Icinga/puppet-icingaweb2/issues/258) - Rework to use module data [\#257](https://github.com/Icinga/puppet-icingaweb2/issues/257) - Add Support for RHEL 8 [\#255](https://github.com/Icinga/puppet-icingaweb2/issues/255) - Add Support for Debian 10 [\#254](https://github.com/Icinga/puppet-icingaweb2/issues/254) - Update params for authmethod msldap [\#252](https://github.com/Icinga/puppet-icingaweb2/pull/252) ([gomesar9](https://github.com/gomesar9)) - Add new 1.7.x dependencies [\#248](https://github.com/Icinga/puppet-icingaweb2/pull/248) ([lbetz](https://github.com/lbetz)) - Add timeout to ldap resource [\#245](https://github.com/Icinga/puppet-icingaweb2/pull/245) ([joernott](https://github.com/joernott)) - Add logging config option php [\#242](https://github.com/Icinga/puppet-icingaweb2/pull/242) ([lbetz](https://github.com/lbetz)) - Document logging config option 'php' [\#241](https://github.com/Icinga/puppet-icingaweb2/pull/241) ([lippserd](https://github.com/lippserd)) - Add parameter poold\_purge to class phpfpm [\#239](https://github.com/Icinga/puppet-icingaweb2/pull/239) ([dhoppe](https://github.com/dhoppe)) - Update and verify acceptance tests [\#234](https://github.com/Icinga/puppet-icingaweb2/pull/234) ([lazyfrosch](https://github.com/lazyfrosch)) **Fixed bugs:** - Multiple LDAP Hosts do not work anymore [\#261](https://github.com/Icinga/puppet-icingaweb2/issues/261) - Class ::icingaweb2::module::monitoring doesn't work with Documentation defaults [\#253](https://github.com/Icinga/puppet-icingaweb2/issues/253) - Ensure config directory mode is set with setgid [\#251](https://github.com/Icinga/puppet-icingaweb2/pull/251) ([lazyfrosch](https://github.com/lazyfrosch)) - git\_revision is a required parameter [\#249](https://github.com/Icinga/puppet-icingaweb2/pull/249) ([attachmentgenie](https://github.com/attachmentgenie)) - Remove question marks of parameter db\_port [\#238](https://github.com/Icinga/puppet-icingaweb2/pull/238) ([dhoppe](https://github.com/dhoppe)) **Closed issues:** - Add new 1.7.x dependencies for director module: ipl / reactbundle / incubator [\#247](https://github.com/Icinga/puppet-icingaweb2/issues/247) **Merged pull requests:** - Remove parameter fastcgi\_script [\#243](https://github.com/Icinga/puppet-icingaweb2/pull/243) ([dhoppe](https://github.com/dhoppe)) ## [v2.3.1](https://github.com/icinga/puppet-icingaweb2/tree/v2.3.1) (2019-06-25) [Full Changelog](https://github.com/icinga/puppet-icingaweb2/compare/v2.3.0...v2.3.1) **Implemented enhancements:** - metadata: Raise requirements for puppetlabs modules [\#236](https://github.com/Icinga/puppet-icingaweb2/pull/236) ([lazyfrosch](https://github.com/lazyfrosch)) **Fixed bugs:** - possible regression: new cookie path parameter may break existing installs [\#235](https://github.com/Icinga/puppet-icingaweb2/issues/235) - config: Let cookie\_path be undef by default [\#237](https://github.com/Icinga/puppet-icingaweb2/pull/237) ([lazyfrosch](https://github.com/lazyfrosch)) ## [v2.3.0](https://github.com/icinga/puppet-icingaweb2/tree/v2.3.0) (2019-05-20) [Full Changelog](https://github.com/icinga/puppet-icingaweb2/compare/v2.2.0...v2.3.0) **Implemented enhancements:** - Support puppet 6 [\#220](https://github.com/Icinga/puppet-icingaweb2/issues/220) - add logging facility and application to config [\#230](https://github.com/Icinga/puppet-icingaweb2/pull/230) ([costela](https://github.com/costela)) - Support Puppet 6 [\#226](https://github.com/Icinga/puppet-icingaweb2/pull/226) ([wdschei](https://github.com/wdschei)) - add config section to adjust the cookie path [\#218](https://github.com/Icinga/puppet-icingaweb2/pull/218) ([XnS](https://github.com/XnS)) **Fixed bugs:** - Parameter url of module::graphite has to be optional [\#223](https://github.com/Icinga/puppet-icingaweb2/issues/223) - Docs: icingaweb2::config::resource 'port' requires an integer, not a string [\#231](https://github.com/Icinga/puppet-icingaweb2/pull/231) ([dnsmichi](https://github.com/dnsmichi)) **Closed issues:** - support puppet/stdlib \> 5.0 [\#232](https://github.com/Icinga/puppet-icingaweb2/issues/232) - Error logging\_path needs to be Stdlib::Absolutepath, got String instead [\#224](https://github.com/Icinga/puppet-icingaweb2/issues/224) - icingaweb2::module::puppetdb tests are failing [\#216](https://github.com/Icinga/puppet-icingaweb2/issues/216) **Merged pull requests:** - Set confdir in the rspec context \(fixes \#216\) [\#217](https://github.com/Icinga/puppet-icingaweb2/pull/217) ([johanfleury](https://github.com/johanfleury)) - Avoid duplicate inisection declarations [\#215](https://github.com/Icinga/puppet-icingaweb2/pull/215) ([johanfleury](https://github.com/johanfleury)) ## [v2.2.0](https://github.com/icinga/puppet-icingaweb2/tree/v2.2.0) (2018-05-14) [Full Changelog](https://github.com/icinga/puppet-icingaweb2/compare/v2.1.0...v2.2.0) **Implemented enhancements:** - 'icinga-icingaweb2' \(v2.1.0\) requires 'puppetlabs-vcsrepo' \(\>= 1.3.0 \< 2.0.0\) [\#212](https://github.com/Icinga/puppet-icingaweb2/issues/212) **Closed issues:** - Should be possible to specify a relative path for icingaweb2::module::fileshipper target [\#209](https://github.com/Icinga/puppet-icingaweb2/issues/209) **Merged pull requests:** - Add param for IDO DB charset [\#208](https://github.com/Icinga/puppet-icingaweb2/pull/208) ([marcofl](https://github.com/marcofl)) ## [v2.1.0](https://github.com/icinga/puppet-icingaweb2/tree/v2.1.0) (2018-01-23) [Full Changelog](https://github.com/icinga/puppet-icingaweb2/compare/v2.0.1...v2.1.0) **Implemented enhancements:** - missing domain attribute for icingaweb2::config::authmethod [\#203](https://github.com/Icinga/puppet-icingaweb2/issues/203) - Add elasticsearch module [\#193](https://github.com/Icinga/puppet-icingaweb2/issues/193) - Add graphite module [\#192](https://github.com/Icinga/puppet-icingaweb2/issues/192) - Update apache2 example [\#191](https://github.com/Icinga/puppet-icingaweb2/issues/191) - Add default backend in groups.ini [\#188](https://github.com/Icinga/puppet-icingaweb2/issues/188) - Links to apache2 and nginx examples doesn't work [\#185](https://github.com/Icinga/puppet-icingaweb2/issues/185) - Add vSphere module [\#183](https://github.com/Icinga/puppet-icingaweb2/issues/183) - Add fileshipper module [\#182](https://github.com/Icinga/puppet-icingaweb2/issues/182) **Fixed bugs:** - Setting up icingaweb2 with postgresql on a different port than 5432 leads to an error [\#195](https://github.com/Icinga/puppet-icingaweb2/issues/195) - protected\_customvars handled incorrectly? [\#206](https://github.com/Icinga/puppet-icingaweb2/issues/206) - puppetdb: issue if host does not resolve to puppetdb [\#197](https://github.com/Icinga/puppet-icingaweb2/issues/197) **Merged pull requests:** - added domain attribute to icingaweb2::config::groupbackend [\#205](https://github.com/Icinga/puppet-icingaweb2/pull/205) ([spaolo](https://github.com/spaolo)) - added domain attribute to icingaweb2::config::authmethod [\#204](https://github.com/Icinga/puppet-icingaweb2/pull/204) ([spaolo](https://github.com/spaolo)) - Provide specific port to mysql and postgresql [\#196](https://github.com/Icinga/puppet-icingaweb2/pull/196) ([Faffnir](https://github.com/Faffnir)) - Rename default administrative user to 'icingaadmin' [\#194](https://github.com/Icinga/puppet-icingaweb2/pull/194) ([dnsmichi](https://github.com/dnsmichi)) - Add missing curly bracket and trailing commas [\#189](https://github.com/Icinga/puppet-icingaweb2/pull/189) ([rgevaert](https://github.com/rgevaert)) - Fix protected\_customvars bugs and papercuts [\#186](https://github.com/Icinga/puppet-icingaweb2/pull/186) ([olasd](https://github.com/olasd)) ## [v2.0.1](https://github.com/icinga/puppet-icingaweb2/tree/v2.0.1) (2017-12-28) [Full Changelog](https://github.com/icinga/puppet-icingaweb2/compare/v2.0.0...v2.0.1) **Implemented enhancements:** - Support fcgi as example for apache [\#201](https://github.com/Icinga/puppet-icingaweb2/issues/201) **Merged pull requests:** - fix \#201 Suppoet fcgi as example for apache [\#202](https://github.com/Icinga/puppet-icingaweb2/pull/202) ([lbetz](https://github.com/lbetz)) - Fix typos on README.md [\#184](https://github.com/Icinga/puppet-icingaweb2/pull/184) ([Tokynet](https://github.com/Tokynet)) ## [v2.0.0](https://github.com/icinga/puppet-icingaweb2/tree/v2.0.0) (2017-10-11) [Full Changelog](https://github.com/icinga/puppet-icingaweb2/compare/1.0.6...v2.0.0) **Implemented enhancements:** - Store preferences in database [\#166](https://github.com/Icinga/puppet-icingaweb2/issues/166) - Support icinga2 API command transport [\#74](https://github.com/Icinga/puppet-icingaweb2/issues/74) - Use RSpec helper rspec-puppet-facts [\#70](https://github.com/Icinga/puppet-icingaweb2/issues/70) - Support LDAP auth\_backend [\#69](https://github.com/Icinga/puppet-icingaweb2/issues/69) - Manage icingaweb2 user [\#68](https://github.com/Icinga/puppet-icingaweb2/issues/68) - Updating graphite with more config [\#66](https://github.com/Icinga/puppet-icingaweb2/issues/66) - Adding monitoring module [\#65](https://github.com/Icinga/puppet-icingaweb2/issues/65) - \[dev.icinga.com \#9243\] add ldaps to resource\_ldap.pp [\#56](https://github.com/Icinga/puppet-icingaweb2/issues/56) - \[dev.icinga.com \#9155\] Add module generictts [\#54](https://github.com/Icinga/puppet-icingaweb2/issues/54) - Update Docs Install Icinga Web icinga2 vs icingaweb2 [\#174](https://github.com/Icinga/puppet-icingaweb2/issues/174) - Add translation module [\#169](https://github.com/Icinga/puppet-icingaweb2/issues/169) - Parameterize conf\_user [\#145](https://github.com/Icinga/puppet-icingaweb2/issues/145) - Update version in Puppet Forge [\#141](https://github.com/Icinga/puppet-icingaweb2/issues/141) - Add changelog [\#128](https://github.com/Icinga/puppet-icingaweb2/issues/128) - Add Cube module [\#127](https://github.com/Icinga/puppet-icingaweb2/issues/127) - Add Director module [\#126](https://github.com/Icinga/puppet-icingaweb2/issues/126) - Add business process module [\#125](https://github.com/Icinga/puppet-icingaweb2/issues/125) - Refactor monitoring module class [\#124](https://github.com/Icinga/puppet-icingaweb2/issues/124) - Add defined type to generally handle module installations and configuration [\#122](https://github.com/Icinga/puppet-icingaweb2/issues/122) - Rename classes to icingaweb2::module::modulename [\#121](https://github.com/Icinga/puppet-icingaweb2/issues/121) - Remove unsupported modules [\#120](https://github.com/Icinga/puppet-icingaweb2/issues/120) - Default auth mechanism [\#119](https://github.com/Icinga/puppet-icingaweb2/issues/119) - Add defined type for roles [\#118](https://github.com/Icinga/puppet-icingaweb2/issues/118) - Add defined type to handle config.ini [\#117](https://github.com/Icinga/puppet-icingaweb2/issues/117) - Add defined type to handle groups.ini [\#116](https://github.com/Icinga/puppet-icingaweb2/issues/116) - Add defined type to handle authentication.ini [\#115](https://github.com/Icinga/puppet-icingaweb2/issues/115) - Add type to handle resources.ini [\#114](https://github.com/Icinga/puppet-icingaweb2/issues/114) - Add defined type that handles Ini configurations [\#113](https://github.com/Icinga/puppet-icingaweb2/issues/113) - Update basic specs [\#112](https://github.com/Icinga/puppet-icingaweb2/issues/112) - Add release guide [\#111](https://github.com/Icinga/puppet-icingaweb2/issues/111) - Add testing guide [\#110](https://github.com/Icinga/puppet-icingaweb2/issues/110) - Add contributing guide [\#109](https://github.com/Icinga/puppet-icingaweb2/issues/109) - Add some basic examples [\#108](https://github.com/Icinga/puppet-icingaweb2/issues/108) - Basic Apache configuration with example [\#107](https://github.com/Icinga/puppet-icingaweb2/issues/107) - Add reference documentation [\#106](https://github.com/Icinga/puppet-icingaweb2/issues/106) - Update general documentation [\#105](https://github.com/Icinga/puppet-icingaweb2/issues/105) - Create parameter manage\_package [\#104](https://github.com/Icinga/puppet-icingaweb2/issues/104) - Remove deprecated parameters [\#103](https://github.com/Icinga/puppet-icingaweb2/issues/103) - General configuration [\#102](https://github.com/Icinga/puppet-icingaweb2/issues/102) - Remove git installation method for Icinga Web 2 [\#101](https://github.com/Icinga/puppet-icingaweb2/issues/101) - Ensure support for certain operating systems [\#100](https://github.com/Icinga/puppet-icingaweb2/issues/100) - Add header with inline documentation to all files [\#99](https://github.com/Icinga/puppet-icingaweb2/issues/99) - Support initialize for PostgreSQL [\#82](https://github.com/Icinga/puppet-icingaweb2/issues/82) - Acceptance tests [\#78](https://github.com/Icinga/puppet-icingaweb2/issues/78) - Adding database initialization [\#64](https://github.com/Icinga/puppet-icingaweb2/issues/64) - Updating monitoring transports [\#75](https://github.com/Icinga/puppet-icingaweb2/pull/75) ([lazyfrosch](https://github.com/lazyfrosch)) - Update module base [\#73](https://github.com/Icinga/puppet-icingaweb2/pull/73) ([lazyfrosch](https://github.com/lazyfrosch)) - Refactoring repository management [\#72](https://github.com/Icinga/puppet-icingaweb2/pull/72) ([lazyfrosch](https://github.com/lazyfrosch)) - Using rspec-puppet-facts for new spec [\#71](https://github.com/Icinga/puppet-icingaweb2/pull/71) ([lazyfrosch](https://github.com/lazyfrosch)) **Fixed bugs:** - Dependency puppetlabs/concat conflicts with puppet-icinga2 [\#165](https://github.com/Icinga/puppet-icingaweb2/issues/165) - rspec tests broken due to unintepreted facts [\#161](https://github.com/Icinga/puppet-icingaweb2/issues/161) - Can't manage multiple \[config\] sections because of duplicate resource [\#146](https://github.com/Icinga/puppet-icingaweb2/issues/146) - Fixing config files permissions [\#67](https://github.com/Icinga/puppet-icingaweb2/issues/67) - \[dev.icinga.com \#12142\] Why does initialize.pp require /root/.my.cnf on RedHat/CentOS, not Debian/Ubuntu? [\#61](https://github.com/Icinga/puppet-icingaweb2/issues/61) - \[dev.icinga.com \#11876\] Path for mysql-command is missing [\#60](https://github.com/Icinga/puppet-icingaweb2/issues/60) - \[dev.icinga.com \#11719\] Missing packages if APT::Install-Recommends "false"; [\#59](https://github.com/Icinga/puppet-icingaweb2/issues/59) - \[dev.icinga.com \#11584\] what is the standard password set by initialize.pp? [\#58](https://github.com/Icinga/puppet-icingaweb2/issues/58) - \[dev.icinga.com \#11507\] installing icinga web2 [\#57](https://github.com/Icinga/puppet-icingaweb2/issues/57) - Install dependencies by default [\#176](https://github.com/Icinga/puppet-icingaweb2/issues/176) - Logging directory is not created by module [\#172](https://github.com/Icinga/puppet-icingaweb2/issues/172) - Incorrect config directory access mode on Debian [\#85](https://github.com/Icinga/puppet-icingaweb2/issues/85) - Package managers handle dependencies. [\#87](https://github.com/Icinga/puppet-icingaweb2/pull/87) ([tdb](https://github.com/tdb)) - deployment: Correct directory management [\#76](https://github.com/Icinga/puppet-icingaweb2/pull/76) ([lazyfrosch](https://github.com/lazyfrosch)) **Closed issues:** - /etc/icingaweb2/modules isn't created [\#158](https://github.com/Icinga/puppet-icingaweb2/issues/158) - Allow muliple API Host for icingaweb2::module::monitoring [\#155](https://github.com/Icinga/puppet-icingaweb2/issues/155) - icingaweb2::module::module\_dir parameter default value should probably not be undef [\#147](https://github.com/Icinga/puppet-icingaweb2/issues/147) - Missing Configuration [\#138](https://github.com/Icinga/puppet-icingaweb2/issues/138) - Syntax error at 'resource\_name'; expected '}' [\#136](https://github.com/Icinga/puppet-icingaweb2/issues/136) - Please move development to master [\#134](https://github.com/Icinga/puppet-icingaweb2/issues/134) - Git install method is missing minified assets [\#129](https://github.com/Icinga/puppet-icingaweb2/issues/129) - Add default modules [\#123](https://github.com/Icinga/puppet-icingaweb2/issues/123) - How to enable module monitoring Via Puppet [\#95](https://github.com/Icinga/puppet-icingaweb2/issues/95) - It would be nice to have possibility to change certain file/directory permissions [\#94](https://github.com/Icinga/puppet-icingaweb2/issues/94) - Could not find declared class icingaweb2::mod::monitoring [\#93](https://github.com/Icinga/puppet-icingaweb2/issues/93) - The parameter 'ido\_db\_host' is declared more than once [\#92](https://github.com/Icinga/puppet-icingaweb2/issues/92) - missing groups.ini [\#91](https://github.com/Icinga/puppet-icingaweb2/issues/91) - Add Debian Stretch to the compatibility list? [\#89](https://github.com/Icinga/puppet-icingaweb2/issues/89) - Dependencies incorrect on Ubuntu 16.04+ [\#88](https://github.com/Icinga/puppet-icingaweb2/issues/88) - Improve Apache integration and document it [\#83](https://github.com/Icinga/puppet-icingaweb2/issues/83) - Default credentials for login [\#80](https://github.com/Icinga/puppet-icingaweb2/issues/80) - Deprecate default install method [\#77](https://github.com/Icinga/puppet-icingaweb2/issues/77) - \[dev.icinga.com \#9154\] Add module pnp4nagios [\#53](https://github.com/Icinga/puppet-icingaweb2/issues/53) - Icingaweb2::Module::Monitoring doesn't actually install the module [\#160](https://github.com/Icinga/puppet-icingaweb2/issues/160) - Add generictts module [\#154](https://github.com/Icinga/puppet-icingaweb2/issues/154) - add icingaweb2::module::puppetdb [\#152](https://github.com/Icinga/puppet-icingaweb2/issues/152) - add icingaweb2::module::doc [\#150](https://github.com/Icinga/puppet-icingaweb2/issues/150) - Icingaweb2 schema only created on second run when configured along with icinga2 [\#144](https://github.com/Icinga/puppet-icingaweb2/issues/144) - Correct documentation for authentication configuration [\#143](https://github.com/Icinga/puppet-icingaweb2/issues/143) - Align documentation for duplicate repository [\#131](https://github.com/Icinga/puppet-icingaweb2/issues/131) - Non compatible dependencies between icinga2 and Icingaweb2 latest releases [\#98](https://github.com/Icinga/puppet-icingaweb2/issues/98) - Roles setting is not up to date and is not supporting businessprocess-prefix [\#96](https://github.com/Icinga/puppet-icingaweb2/issues/96) - Resources.ini should not be world-readable [\#90](https://github.com/Icinga/puppet-icingaweb2/issues/90) - Documentation updates [\#79](https://github.com/Icinga/puppet-icingaweb2/issues/79) **Merged pull requests:** - Add example manifest for Grafana module [\#181](https://github.com/Icinga/puppet-icingaweb2/pull/181) ([druchoo](https://github.com/druchoo)) - Add 'LDAP Base DN' to 'User Backends' [\#180](https://github.com/Icinga/puppet-icingaweb2/pull/180) ([druchoo](https://github.com/druchoo)) - Removed puppetlabs-apache from dependencies [\#178](https://github.com/Icinga/puppet-icingaweb2/pull/178) ([noqqe](https://github.com/noqqe)) - Manage logging directory and file [\#173](https://github.com/Icinga/puppet-icingaweb2/pull/173) ([baurmatt](https://github.com/baurmatt)) - Add translation module [\#170](https://github.com/Icinga/puppet-icingaweb2/pull/170) ([baurmatt](https://github.com/baurmatt)) - Allow preferences to be stored in db [\#168](https://github.com/Icinga/puppet-icingaweb2/pull/168) ([baurmatt](https://github.com/baurmatt)) - Add git repository config [\#167](https://github.com/Icinga/puppet-icingaweb2/pull/167) ([tdukaric](https://github.com/tdukaric)) - Add a context per operating system [\#162](https://github.com/Icinga/puppet-icingaweb2/pull/162) ([baurmatt](https://github.com/baurmatt)) - Add modules directory [\#159](https://github.com/Icinga/puppet-icingaweb2/pull/159) ([baurmatt](https://github.com/baurmatt)) - Loosen concat version restrictions [\#156](https://github.com/Icinga/puppet-icingaweb2/pull/156) ([quixoten](https://github.com/quixoten)) - Implement puppetdb module [\#153](https://github.com/Icinga/puppet-icingaweb2/pull/153) ([rgevaert](https://github.com/rgevaert)) - Implement icingaweb2::module::doc [\#151](https://github.com/Icinga/puppet-icingaweb2/pull/151) ([rgevaert](https://github.com/rgevaert)) - Prevent duplicate resources errors [\#149](https://github.com/Icinga/puppet-icingaweb2/pull/149) ([rgevaert](https://github.com/rgevaert)) - Correct authentication configuration documentation [\#142](https://github.com/Icinga/puppet-icingaweb2/pull/142) ([rgevaert](https://github.com/rgevaert)) - Add GitHub issue template [\#137](https://github.com/Icinga/puppet-icingaweb2/pull/137) ([dnsmichi](https://github.com/dnsmichi)) - Add nginx example [\#84](https://github.com/Icinga/puppet-icingaweb2/pull/84) ([prozach](https://github.com/prozach)) - Fixing testing issues [\#81](https://github.com/Icinga/puppet-icingaweb2/pull/81) ([lazyfrosch](https://github.com/lazyfrosch)) - Update URLs to GitHub [\#62](https://github.com/Icinga/puppet-icingaweb2/pull/62) ([bobapple](https://github.com/bobapple)) - testing: Updating travis settings [\#51](https://github.com/Icinga/puppet-icingaweb2/pull/51) ([lazyfrosch](https://github.com/lazyfrosch)) - remove dependency on concat module [\#50](https://github.com/Icinga/puppet-icingaweb2/pull/50) ([lbischof](https://github.com/lbischof)) - substituting non existing parameter [\#49](https://github.com/Icinga/puppet-icingaweb2/pull/49) ([attachmentgenie](https://github.com/attachmentgenie)) - Fix permissions [\#30](https://github.com/Icinga/puppet-icingaweb2/pull/30) ([petems](https://github.com/petems)) - Change sql\_schema\_location if using git [\#29](https://github.com/Icinga/puppet-icingaweb2/pull/29) ([petems](https://github.com/petems)) - Allow multiple commandtransports [\#157](https://github.com/Icinga/puppet-icingaweb2/pull/157) ([baurmatt](https://github.com/baurmatt)) ## [1.0.6](https://github.com/icinga/puppet-icingaweb2/tree/1.0.6) (2015-11-10) [Full Changelog](https://github.com/icinga/puppet-icingaweb2/compare/1.0.5...1.0.6) ## [1.0.5](https://github.com/icinga/puppet-icingaweb2/tree/1.0.5) (2015-08-04) [Full Changelog](https://github.com/icinga/puppet-icingaweb2/compare/1.0.4...1.0.5) ## [1.0.4](https://github.com/icinga/puppet-icingaweb2/tree/1.0.4) (2015-06-24) [Full Changelog](https://github.com/icinga/puppet-icingaweb2/compare/1.0.3...1.0.4) **Merged pull requests:** - Add support for Scientific Linux in Yum repo [\#16](https://github.com/Icinga/puppet-icingaweb2/pull/16) ([joshbeard](https://github.com/joshbeard)) ## [1.0.3](https://github.com/icinga/puppet-icingaweb2/tree/1.0.3) (2015-05-07) [Full Changelog](https://github.com/icinga/puppet-icingaweb2/compare/1.0.2...1.0.3) ## [1.0.2](https://github.com/icinga/puppet-icingaweb2/tree/1.0.2) (2015-05-07) [Full Changelog](https://github.com/icinga/puppet-icingaweb2/compare/1.0.1...1.0.2) ## [1.0.1](https://github.com/icinga/puppet-icingaweb2/tree/1.0.1) (2015-05-07) [Full Changelog](https://github.com/icinga/puppet-icingaweb2/compare/1.0.0...1.0.1) ## [1.0.0](https://github.com/icinga/puppet-icingaweb2/tree/1.0.0) (2015-05-07) **Implemented enhancements:** - \[dev.icinga.com \#9158\] Add module graphite [\#55](https://github.com/Icinga/puppet-icingaweb2/issues/55) - \[dev.icinga.com \#9153\] Add module businessprocess [\#52](https://github.com/Icinga/puppet-icingaweb2/issues/52) - Fix authentication configuration [\#8](https://github.com/Icinga/puppet-icingaweb2/pull/8) ([lazyfrosch](https://github.com/lazyfrosch)) **Merged pull requests:** - Don't put blank host/service filters in roles.ini [\#13](https://github.com/Icinga/puppet-icingaweb2/pull/13) ([jamesweakley](https://github.com/jamesweakley)) - Moving away from templates to usign inifile from Puppetlabs/inifile [\#7](https://github.com/Icinga/puppet-icingaweb2/pull/7) ([smbambling](https://github.com/smbambling)) -\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* \ No newline at end of file +\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* diff --git a/REFERENCE.md b/REFERENCE.md index 1cfe0f6..a13b100 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -1,2293 +1,2349 @@ # 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. * [`icingaweb2::module::vspheredb`](#icingaweb2modulevspheredb): Installs the vsphereDB plugin * [`icingaweb2::module::vspheredb::service`](#icingaweb2modulevspheredbservice): Installs and configures the vspheredb service. #### Private Classes * `icingaweb2::config`: Configures Icinga Web 2. * `icingaweb2::install`: Installs Icinga Web 2 and extra packages. ### 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. +### Data types + +* [`Icingaweb2::AdminRole`](#icingaweb2adminrole): A strict type for the default admin role + ## 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_repos => 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_repos => 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` Deprecated, use manage_repos. Default value: ``false`` ##### `manage_repos` Data type: `Boolean` When set to true this module will use the module icinga/puppet-icinga to manage repositories, e.g. the release repo on packages.icinga.com repository by default, the EPEL repository or Backports. For more information, see http://github.com/icinga/puppet-icinga. 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`` +##### `admin_role` + +Data type: `Variant[Icingaweb2::AdminRole, Boolean[false]]` + +Manage a role for admin access. + +##### `default_admin_username` + +Data type: `String` + +Default username for initial admin access. This parameter is only used +if `import_schema` is set to `true` and only during the import itself. + +##### `default_admin_password` + +Data type: `String` + +Default password for initial admin access. This parameter is only used +if `import_schema` is set to `true` and only during the import itself. + ### `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` +##### `mysql_vspheredb_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. Default value: `'https://github.com/Icinga/icingaweb2-module-businessprocess.git'` ##### `git_revision` Data type: `Optional[String]` Set either a branch or a tag name, eg. `master` or `v2.1.0`. Default value: ``undef`` ##### `install_method` Data type: `Enum['git', 'none', 'package']` Install methods are `git`, `package` and `none` is supported as installation method. Default value: `'git'` ##### `package_name` Data type: `String` Package name of the module. This setting is only valid in combination with the installation method `package`. Default value: `'icingaweb2-module-businessprocess'` ### `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. Default value: `'https://github.com/Icinga/icingaweb2-module-cube.git'` ##### `git_revision` Data type: `Optional[String]` Set either a branch or a tag name, eg. `master` or `v1.0.0`. Default value: ``undef`` ##### `install_method` Data type: `Enum['git', 'none', 'package']` Install methods are `git`, `package` and `none` is supported as installation method. Default value: `'git'` ##### `package_name` Data type: `String` Package name of the module. This setting is only valid in combination with the installation method `package`. Default value: `'icingaweb2-module-cube'` ### `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. Default value: `'https://github.com/Icinga/icingaweb2-module-director.git'` ##### `git_revision` Data type: `Optional[String]` Set either a branch or a tag name, eg. `master` or `v1.3.2`. Default value: ``undef`` ##### `install_method` Data type: `Enum['git', 'package', 'none']` Install methods are `git`, `package` and `none` is supported as installation method. Default value: `'git'` ##### `package_name` Data type: `String` Package name of the module. This setting is only valid in combination with the installation method `package`. Default value: `'icingaweb2-module-director'` ##### `db_type` Data type: `Enum['mysql', 'pgsql']` Type of your database. Either `mysql` or `pgsql`. Default value: `'mysql'` ##### `db_host` Data type: `Optional[Stdlib::Host]` Hostname of the database. Default value: ``undef`` ##### `db_port` Data type: `Optional[Stdlib::Port]` Port of the database. Default value: ``undef`` ##### `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: `Optional[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. +Specifies user to run director service daemon. Only available if +install_method package is not used. Default value: `'icingadirector'` ##### `group` Data type: `String` Specifies primary group for user to run director service daemon. + Only available if install_method package is not used. Default value: `'icingaweb2'` ##### `manage_user` Data type: `Boolean` -Whether to manage the server user resource. +Whether to manage the server user resource. Only available if +install_method package is not used. 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. Default value: `'https://github.com/Icinga/icingaweb2-module-elasticsearch.git'` ##### `install_method` Data type: `Enum['git', 'none', 'package']` Install methods are `git`, `package` and `none` is supported as installation method. Default value: `'git'` ##### `package_name` Data type: `String` Package name of the module. This setting is only valid in combination with the installation method `package`. Default value: `'icingaweb2-module-elasticsearch'` ##### `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. Default value: `'https://github.com/Icinga/icingaweb2-module-fileshipper.git'` ##### `install_method` Data type: `Enum['git', 'none', 'package']` Install methods are `git`, `package` and `none` is supported as installation method. Default value: `'git'` ##### `package_name` Data type: `String` Package name of the module. This setting is only valid in combination with the installation method `package`. Default value: `'icingaweb2-module-fileshipper'` ##### `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. Default value: `'https://github.com/Icinga/icingaweb2-module-generictts.git'` ##### `git_revision` Data type: `Optional[String]` Set either a branch or a tag name, eg. `master` or `v2.0.0`. Default value: ``undef`` ##### `install_method` Data type: `Enum['git', 'none', 'package']` Install methods are `git`, `package` and `none` is supported as installation method. Default value: `'git'` ##### `package_name` Data type: `String` Package name of the module. This setting is only valid in combination with the installation method `package`. Default value: `'icingaweb2-module-generictts'` ##### `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. Default value: `'https://github.com/Icinga/icingaweb2-module-graphite.git'` ##### `install_method` Data type: `Enum['git', 'none', 'package']` Install methods are `git`, `package` and `none` is supported as installation method. Default value: `'git'` ##### `package_name` Data type: `String` Package name of the module. This setting is only valid in combination with the installation method `package`. Default value: `'icingaweb2-module-graphite'` ##### `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`` ##### `git_revision` Data type: `Optional[String]` 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_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. Default value: `'https://github.com/Icinga/icingaweb2-module-puppetdb.git'` ##### `git_revision` Data type: `Optional[String]` Set either a branch or a tag name, eg. `master` or `v1.3.2`. Default value: ``undef`` ##### `install_method` Data type: `Enum['git', 'none', 'package']` Install methods are `git`, `package` and `none` is supported as installation method. Default value: `'git'` ##### `package_name` Data type: `String` Package name of the module. This setting is only valid in combination with the installation method `package`. Default value: `'icingaweb2-module-puppetdb'` ##### `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. Default value: `'https://github.com/Icinga/icingaweb2-module-vsphere.git'` ##### `install_method` Data type: `Enum['git', 'none', 'package']` Install methods are `git`, `package` and `none` is supported as installation method. Default value: `'git'` ##### `package_name` Data type: `String` Package name of the module. This setting is only valid in combination with the installation method `package`. Default value: `'icingaweb2-module-vsphere'` ##### `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`` ### `icingaweb2::module::vspheredb` Installs the vsphereDB plugin #### Examples ##### ```puppet class { 'icingaweb2::module::vspheredb': ensure => 'present', git_revision => 'v1.1.0', db_host => 'localhost', db_name => 'vspheredb', db_username => 'vspheredb', db_password => 'supersecret', } ``` #### Parameters The following parameters are available in the `icingaweb2::module::vspheredb` class. ##### `ensure` Data type: `Enum['absent', 'present']` Ensur es the state of the vspheredb module. Default value: `'present'` ##### `git_repository` Data type: `String` The upstream module repository. Default value: `'https://github.com/Icinga/icingaweb2-module-vspheredb.git'` ##### `git_revision` Data type: `Optional[String]` The version of the module that needs to be used. Default value: ``undef`` ##### `install_method` Data type: `Enum['git', 'none', 'package']` Install methods are `git`, `package` and `none` is supported as installation method. Default value: `'git'` ##### `package_name` Data type: `String` Package name of the module. This setting is only valid in combination with the installation method `package`. Default value: `'icingaweb2-module-vspheredb'` ##### `db_type` Data type: `Enum['mysql']` The database type. Either mysql or postgres. Default value: `'mysql'` ##### `db_host` Data type: `Optional[Stdlib::Host]` The host where the vspheredb-database will be running Default value: ``undef`` ##### `db_port` Data type: `Stdlib::Port` The port on which the database is accessible. Default value: `3306` ##### `db_name` Data type: `Optional[String]` The name of the database this module should use. Default value: ``undef`` ##### `db_username` Data type: `Optional[String]` The username needed to access the database. Default value: ``undef`` ##### `db_password` Data type: `Optional[String]` The password needed to access the database. Default value: ``undef`` ##### `db_charset` Data type: `String` The charset the database is set to. Default value: `'utf8mb4'` +##### `import_schema` + +Data type: `Boolean` + +Whether to import the database schema or not. + +Default value: ``false`` + ### `icingaweb2::module::vspheredb::service` Installs and configures the vspheredb service. * **Note** Only systemd is supported by the Icinga Team and this module. #### Examples ##### ```puppet include icingaweb2::module::vspheredb::service ``` #### Parameters The following parameters are available in the `icingaweb2::module::vspheredb::service` class. ##### `ensure` Data type: `Stdlib::Ensure::Service` Whether the vspheredb service should be running. Default value: `'running'` ##### `enable` Data type: `Boolean` Enable or disable the service. Default value: ``true`` ##### `user` Data type: `String` Specifies the user to run the vsphere service daemon as. +Only available if install_method package is not used. Default value: `'icingavspheredb'` ##### `group` Data type: `String` Specifies the primary group to run the vspheredb service daemon as. +Only available if install_method package is not used. Default value: `'icingaweb2'` ##### `manage_user` Data type: `Boolean` -Whether to manage the server user resource. +Whether to manage the server user resource. Only available if +install_method package is not used. Default value: ``true`` ## 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` 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` or `msldap`. Default value: ``undef`` ##### `ldap_filter` Data type: `Optional[String]` 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` 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[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', 'mssql', 'oci', 'oracle', 'ibm', 'sqlite']]` Set database type to connect. 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`` +## Data types + +### `Icingaweb2::AdminRole` + +A strict type for the default admin role + +Alias of `Struct[{ + name => String, + users => Optional[Array[String]], + groups => Optional[Array[String]], +}]` + diff --git a/manifests/init.pp b/manifests/init.pp index 3b8cf86..bd2d5a7 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,190 +1,185 @@ # @summary # Installs and configures Icinga Web 2. # # @param [Enum['file', 'syslog', 'php', 'none']] logging # Whether Icinga Web 2 should log to 'file', 'syslog' or 'php' (web server's error log). Setting 'none' disables logging. # # @param [Stdlib::Absolutepath] logging_file # If 'logging' is set to 'file', this is the target log file. # # @param [Enum['ERROR', 'WARNING', 'INFO', 'DEBUG']] logging_level # Logging verbosity. Possible values are 'ERROR', 'WARNING', 'INFO' and 'DEBUG'. # # @param [Pattern[/user|local[0-7]/]] logging_facility # Logging facility when using syslog. Possible values are 'user' or 'local0' up to 'local7'. # # @param [String] logging_application # Logging application name when using syslog. # # @param [Boolean] show_stacktraces # Whether to display stacktraces in the web interface or not. # # @param [Stdlib::Absolutepath] module_path # Path to module sources. Multiple paths must be separated by colon. # # @param [String] theme # The default theme setting. Users may override this settings. # # @param [Boolean] theme_disabled # Whether users can change themes or not. # # @param [Boolean] manage_repo # Deprecated, use manage_repos. # # @param [Boolean] manage_repos # When set to true this module will use the module icinga/puppet-icinga to manage repositories, # e.g. the release repo on packages.icinga.com repository by default, the EPEL repository or Backports. # For more information, see http://github.com/icinga/puppet-icinga. # # @param [Boolean] manage_package # If set to `false` packages aren't managed. # # @param [Optional[Array[String]]] extra_packages # An array of packages to install additionally. # # @param [Boolean] import_schema # Import database scheme. Make sure you have an existing database if you use this option. # # @param [Enum['mysql', 'pgsql']] db_type # Database type, can be either `mysql` or `pgsql`. This parameter is only used if `import_schema` is `true` or # `config_backend` is `db`. # # @param [Stdlib::Host] db_host # Database hostname. This parameter is only used if `import_schema` is `true` or # `config_backend` is `db`. # # @param [Stdlib::Port] db_port # Port of database host. This parameter is only used if `import_schema` is `true` or # `config_backend` is `db`. # # @param [String] db_name # Database name. This parameter is only used if `import_schema` is `true` or # `config_backend` is `db`. # # @param [Optional[String]] db_username # Username for database access. This parameter is only used if `import_schema` is `true` or # `config_backend` is `db`. # # @param [Optional[String]] db_password # Password for database access. This parameter is only used if `import_schema` is `true` or # `config_backend` is `db`. # # @param [Enum['ini', 'db']] config_backend # 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`. # # @param [String] conf_user # By default this module expects Apache2 on the server. You can change the owner of the config files with this # parameter. # # @param [String] conf_group # Group membership of config files. # # @param [Optional[String]] default_domain # When using domain-aware authentication, you can set a default domain here. # # @param [Optional[Stdlib::Absolutepath]] cookie_path # Path to where cookies are stored. # -# @param [Variant[Struct[{name => String, users => Optional[Array[String]], groups => Optional[Array[String]]}], Boolean[false]]] admin_role +# @param [Variant[Icingaweb2::AdminRole, Boolean[false]]] admin_role # Manage a role for admin access. # -# @param String default_admin_username +# @param [String] default_admin_username # Default username for initial admin access. This parameter is only used # if `import_schema` is set to `true` and only during the import itself. # -# @param String default_admin_password +# @param [String] default_admin_password # Default password for initial admin access. This parameter is only used # if `import_schema` is set to `true` and only during the import itself. # # @example Use MySQL as backend for user authentication: # include ::mysql::server # # mysql::db { 'icingaweb2': # user => 'icingaweb2', # password => 'supersecret', # host => 'localhost', # grant => [ 'ALL' ], # } # # class {'icingaweb2': # manage_repos => true, # import_schema => true, # db_type => 'mysql', # db_host => 'localhost', # db_port => 3306, # db_username => 'icingaweb2', # db_password => 'supersecret', # require => Mysql::Db['icingaweb2'], # } # # @example Use PostgreSQL as backend for user authentication: # include ::postgresql::server # # postgresql::server::db { 'icingaweb2': # user => 'icingaweb2', # password => postgresql_password('icingaweb2', 'icingaweb2'), # } # # class {'icingaweb2': # manage_repos => true, # import_schema => true, # db_type => 'pgsql', # db_host => 'localhost', # db_port => 5432, # db_username => 'icingaweb2', # db_password => 'icingaweb2', # require => Postgresql::Server::Db['icingaweb2'], # } # class icingaweb2 ( - Stdlib::Absolutepath $module_path, - Stdlib::Absolutepath $logging_file, - String $conf_user, - String $conf_group, - Variant[ - Struct[{ - name => String, - users => Optional[Array[String]], - groups => Optional[Array[String]] - }], Boolean[false]] $admin_role, - String $default_admin_username, - String $default_admin_password, - Enum['file', 'syslog', 'php', 'none'] $logging = 'file', - Enum['ERROR', 'WARNING', 'INFO', 'DEBUG'] $logging_level = 'INFO', - Pattern[/user|local[0-7]/] $logging_facility = 'user', - String $logging_application = 'icingaweb2', - Boolean $show_stacktraces = false, - String $theme = 'Icinga', - Boolean $theme_disabled = false, - Boolean $manage_repo = false, - Boolean $manage_repos = false, - Boolean $manage_package = true, - Optional[Array[String]] $extra_packages = undef, - Boolean $import_schema = false, - Enum['mysql', 'pgsql'] $db_type = 'mysql', - Stdlib::Host $db_host = 'localhost', - Stdlib::Port $db_port = 3306, - String $db_name = 'icingaweb2', - Optional[String] $db_username = undef, - Optional[String] $db_password = undef, - Enum['ini', 'db'] $config_backend = 'ini', - Optional[String] $default_domain = undef, - Optional[Stdlib::Absolutepath] $cookie_path = undef, + Stdlib::Absolutepath $module_path, + Stdlib::Absolutepath $logging_file, + String $conf_user, + String $conf_group, + Variant[Icingaweb2::AdminRole, Boolean[false]] $admin_role, + String $default_admin_username, + String $default_admin_password, + Enum['file', 'syslog', 'php', 'none'] $logging = 'file', + Enum['ERROR', 'WARNING', 'INFO', 'DEBUG'] $logging_level = 'INFO', + Pattern[/user|local[0-7]/] $logging_facility = 'user', + String $logging_application = 'icingaweb2', + Boolean $show_stacktraces = false, + String $theme = 'Icinga', + Boolean $theme_disabled = false, + Boolean $manage_repo = false, + Boolean $manage_repos = false, + Boolean $manage_package = true, + Optional[Array[String]] $extra_packages = undef, + Boolean $import_schema = false, + Enum['mysql', 'pgsql'] $db_type = 'mysql', + Stdlib::Host $db_host = 'localhost', + Stdlib::Port $db_port = 3306, + String $db_name = 'icingaweb2', + Optional[String] $db_username = undef, + Optional[String] $db_password = undef, + Enum['ini', 'db'] $config_backend = 'ini', + Optional[String] $default_domain = undef, + Optional[Stdlib::Absolutepath] $cookie_path = undef, ) { require ::icingaweb2::globals if $manage_repos or $manage_repo { require ::icinga::repos if $manage_repo { deprecation('manage_repo', 'manage_repo is deprecated and will be replaced by manage_repos in the future.') } } class { '::icingaweb2::install': } -> class { '::icingaweb2::config': } contain ::icingaweb2::install contain ::icingaweb2::config } diff --git a/manifests/module/vspheredb.pp b/manifests/module/vspheredb.pp index dd321d8..e261f69 100644 --- a/manifests/module/vspheredb.pp +++ b/manifests/module/vspheredb.pp @@ -1,116 +1,116 @@ # @summary Installs the vsphereDB plugin # # @param [Enum['absent', 'present']] ensure # Ensur es the state of the vspheredb module. # # @param [String] git_repository # The upstream module repository. # # @param [Optional[String]] git_revision # The version of the module that needs to be used. # # @param [Enum['git', 'none', 'package']] install_method # Install methods are `git`, `package` and `none` is supported as installation method. # # @param [String] package_name # Package name of the module. This setting is only valid in combination with the installation method `package`. # # @param [Enum['mysql']] db_type # The database type. Either mysql or postgres. # # @param [Optional[Stdlib::Host]] db_host # The host where the vspheredb-database will be running # # @param [Stdlib::Port] db_port # The port on which the database is accessible. # # @param [Optional[String]] db_name # The name of the database this module should use. # # @param [Optional[String]] db_username # The username needed to access the database. # # @param [Optional[String]] db_password # The password needed to access the database. # # @param [String] db_charset # The charset the database is set to. # -# @param [Boolean] import_schema, +# @param [Boolean] import_schema # Whether to import the database schema or not. # # @example # class { 'icingaweb2::module::vspheredb': # ensure => 'present', # git_revision => 'v1.1.0', # db_host => 'localhost', # db_name => 'vspheredb', # db_username => 'vspheredb', # db_password => 'supersecret', # } # class icingaweb2::module::vspheredb ( Enum['absent', 'present'] $ensure = 'present', String $git_repository = 'https://github.com/Icinga/icingaweb2-module-vspheredb.git', Optional[String] $git_revision = undef, Enum['git', 'none', 'package'] $install_method = 'git', String $package_name = 'icingaweb2-module-vspheredb', Enum['mysql'] $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 = 'utf8mb4', Boolean $import_schema = false, ) { $conf_dir = $::icingaweb2::globals::conf_dir $mysql_vspheredb_schema = $::icingaweb2::globals::mysql_vspheredb_schema $module_conf_dir = "${conf_dir}/modules/vspheredb" icingaweb2::config::resource { 'icingaweb2-module-vspheredb': 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, } icingaweb2::module { 'vspheredb': ensure => $ensure, git_repository => $git_repository, git_revision => $git_revision, install_method => $install_method, package_name => $package_name, settings => { 'icingaweb2-module-vspheredb' => { 'section_name' => 'db', 'target' => "${module_conf_dir}/config.ini", 'settings' => { 'resource' => 'icingaweb2-module-vspheredb', }, }, }, } if $import_schema { case $db_type { 'mysql': { exec { 'import vspheredb schema': user => 'root', path => $::facts['path'], command => "mysql -h '${db_host}' -P '${db_port}' -u '${db_username}' -p'${db_password}' '${db_name}' < '${mysql_vspheredb_schema}'", unless => "mysql -h '${db_host}' -P '${db_port}' -u '${db_username}' -p'${db_password}' '${db_name}' -Ns -e 'SELECT schema_version FROM vspheredb_schema_migration'", require => Icingaweb2::Module['vspheredb'], } } default: { fail('The database type you provided is not supported.') } } } } diff --git a/metadata.json b/metadata.json index 436d0f8..0ea46a7 100644 --- a/metadata.json +++ b/metadata.json @@ -1,87 +1,87 @@ { "name": "icinga-icingaweb2", - "version": "3.1.0", + "version": "3.2.0", "author": "Icinga Team", "summary": "Icinga Web 2 Puppet Module", "license": "Apache-2.0", "source": "git://github.com/Icinga/puppet-icingaweb2", "project_page": "https://github.com/Icinga/puppet-icingaweb2", "issues_url": "https://github.com/Icinga/puppet-icingaweb2/issues", "dependencies": [ { "name": "puppetlabs/stdlib", "version_requirement": ">= 4.25.0 < 9.0.0" }, { "name": "puppetlabs/concat", "version_requirement": ">= 2.0.1 < 8.0.0" }, { "name": "icinga/icinga", "version_requirement": ">= 1.0.0 < 3.0.0" }, { "name": "puppetlabs/vcsrepo", "version_requirement": ">= 1.3.0 < 6.0.0" }, { "name": "puppet/systemd", "version_requirement": ">= 1.1.1 < 4.0.0" } ], "operatingsystem_support": [ { "operatingsystem": "Debian", "operatingsystemrelease": [ "9", "10" ] }, { "operatingsystem": "RedHat", "operatingsystemrelease": [ "6", "7", "8" ] }, { "operatingsystem": "CentOS", "operatingsystemrelease": [ "6", "7", "8" ] }, { "operatingsystem": "Ubuntu", "operatingsystemrelease": [ "16.04", "18.04", "20.04" ] }, { "operatingsystem": "SLES", "operatingsystemrelease": [ "12", "15" ] } ], "requirements": [ { "name": "puppet", "version_requirement": ">= 4.7.0 < 8.0.0" } ], "tags": [ "icinga", "icinga2", "icingaweb2", "monitoring" ], "pdk-version": "2.2.0", "template-url": "pdk-default#2.2.0", "template-ref": "tags/2.2.0-0-g2381db6" } diff --git a/pdk.yaml b/pdk.yaml new file mode 100644 index 0000000..4bef4bd --- /dev/null +++ b/pdk.yaml @@ -0,0 +1,2 @@ +--- +ignore: [] diff --git a/types/adminrole.pp b/types/adminrole.pp new file mode 100644 index 0000000..bfa2b1a --- /dev/null +++ b/types/adminrole.pp @@ -0,0 +1,6 @@ +# A strict type for the default admin role +type Icingaweb2::AdminRole = Struct[{ + name => String, + users => Optional[Array[String]], + groups => Optional[Array[String]], +}]