diff --git a/manifests/module/businessprocess.pp b/manifests/module/businessprocess.pp index ca1b200..e71cba7 100644 --- a/manifests/module/businessprocess.pp +++ b/manifests/module/businessprocess.pp @@ -1,32 +1,42 @@ # @summary # 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`. # # @param [Enum['absent', 'present']] ensure # Enable or disable module. # # @param [String] git_repository # Set a git repository URL. # # @param [Optional[String]] git_revision # Set either a branch or a tag name, eg. `master` or `v2.1.0`. # +# @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`. +# # @note Check out the [Business Process mdoule documentation](https://www.icinga.com/docs/businessprocess/latest/) for requirements. # # @example # class { 'icingaweb2::module::businessprocess': # git_revision => 'v2.1.0' # } # class icingaweb2::module::businessprocess( - String $git_repository, - Enum['absent', 'present'] $ensure = 'present', - Optional[String] $git_revision = undef, + Enum['absent', 'present'] $ensure = 'present', + String $git_repository = 'https://github.com/Icinga/icingaweb2-module-businessprocess.git', + Optional[String] $git_revision = undef, + Enum['git', 'none', 'package'] $install_method = 'git', + String $package_name = 'icingaweb2-module-businessprocess', ){ icingaweb2::module {'businessprocess': ensure => $ensure, git_repository => $git_repository, git_revision => $git_revision, + install_method => $install_method, + package_name => $package_name, } } diff --git a/manifests/module/cube.pp b/manifests/module/cube.pp index 510ca1d..6d40304 100644 --- a/manifests/module/cube.pp +++ b/manifests/module/cube.pp @@ -1,30 +1,40 @@ # @summary # 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`. # # @param [Enum['absent', 'present']] ensure # Enable or disable module. # # @param [String] git_repository # Set a git repository URL. # # @param [Optional[String]] git_revision # Set either a branch or a tag name, eg. `master` or `v1.0.0`. # +# @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`. +# # @example # class { 'icingaweb2::module::cube': # git_revision => 'v1.0.0' # } # class icingaweb2::module::cube( - String $git_repository, - Enum['absent', 'present'] $ensure = 'present', - Optional[String] $git_revision = undef, + Enum['absent', 'present'] $ensure = 'present', + String $git_repository = 'https://github.com/Icinga/icingaweb2-module-cube.git', + Optional[String] $git_revision = undef, + Enum['git', 'none', 'package'] $install_method = 'git', + String. $package_name = 'icingaweb2-module-cube', ){ icingaweb2::module {'cube': ensure => $ensure, git_repository => $git_repository, git_revision => $git_revision, + install_method => $install_method, + package_name => $package_name, } } diff --git a/manifests/module/director.pp b/manifests/module/director.pp index b2de145..51d3373 100644 --- a/manifests/module/director.pp +++ b/manifests/module/director.pp @@ -1,163 +1,172 @@ # @summary # Installs and configures the director module. # # @note If you want to use `git` as `install_method`, the CLI `git` command has to be installed. You can manage it yourself as package resource or declare the package name in icingaweb2 class parameter `extra_packages`. # # @param [Enum['absent', 'present']] ensure # Enable or disable module. # # @param [String] git_repository # Set a git repository URL. # # @param [Optional[String]] git_revision # Set either a branch or a tag name, eg. `master` or `v1.3.2`. # +# @param [Enum['git', 'package', 'none']] 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', 'pgsql']] db_type # Type of your database. Either `mysql` or `pgsql`. # # @param [Optional[Stdlib::Host]] db_host # Hostname of the database. # # @param [Stdlib::Port] db_port # Port of the database. # # @param [Optional[String]] db_name # Name of the database. # # @param [Optional[String]] db_username # Username for DB connection. # # @param [Optional[String]] db_password # Password for DB connection. # # @param [Boolean] import_schema # Import database schema. # # @param [Boolean] kickstart # Run kickstart command after database migration. This requires `import_schema` to be `true`. # # @param [Optional[String]] endpoint # Endpoint object name of Icinga 2 API. This setting is only valid if `kickstart` is `true`. # # @param [Stdlib::Host] api_host # Icinga 2 API hostname. This setting is only valid if `kickstart` is `true`. # # @param [Stdlib::Port] api_port # Icinga 2 API port. This setting is only valid if `kickstart` is `true`. # # @param [Optional[String]] api_username # Icinga 2 API username. This setting is only valid if `kickstart` is `true`. # # @param [Optional[String]] api_password # Icinga 2 API password. This setting is only valid if `kickstart` is `true`. # # @note Please checkout the [Director module documentation](https://www.icinga.com/docs/director/latest/) for requirements. # # @example # class { 'icingaweb2::module::director': # git_revision => 'v1.7.2', # db_host => 'localhost', # db_name => 'director', # db_username => 'director', # db_password => 'supersecret', # import_schema => true, # kickstart => true, # endpoint => 'puppet-icingaweb2.localdomain', # api_username => 'director', # api_password => 'supersecret', # require => Mysql::Db['director'] # } # class icingaweb2::module::director( - String $git_repository, - Enum['absent', 'present'] $ensure = 'present', - Optional[String] $git_revision = undef, - Enum['mysql', 'pgsql'] $db_type = 'mysql', - Optional[Stdlib::Host] $db_host = undef, - Stdlib::Port $db_port = 3306, - Optional[String] $db_name = undef, - Optional[String] $db_username = undef, - Optional[String] $db_password = undef, - String $db_charset = 'utf8', - Boolean $import_schema = false, - Boolean $kickstart = false, - Optional[String] $endpoint = undef, - Stdlib::Host $api_host = 'localhost', - Stdlib::Port $api_port = 5665, - Optional[String] $api_username = undef, - Optional[String] $api_password = undef, -) { - - $conf_dir = $::icingaweb2::globals::conf_dir + Enum['absent', 'present'] $ensure = 'present', + String $git_repository = 'https://github.com/Icinga/icingaweb2-module-director.git', + Optional[String] $git_revision = undef, + Enum['git', 'package', 'none'] $install_method = 'git', + String. $package_name = 'icingaweb2-module-director', + Enum['mysql', 'pgsql'] $db_type = 'mysql', + Optional[String] $db_host = undef, + Integer[1,65535] $db_port = 3306, + Optional[String] $db_name = undef, + Optional[String] $db_username = undef, + Optional[String] $db_password = undef, + Optional[String] $db_charset = 'utf8', + Optional[Boolean] $import_schema = false, + Optional[Boolean] $kickstart = false, + Optional[String] $endpoint = undef, + String $api_host = 'localhost', + Integer[1,65535] $api_port = 5665, + Optional[String] $api_username = undef, + Optional[String] $api_password = undef, +){ + $conf_dir = $::icingaweb2::params::conf_dir $icingacli_bin = $::icingaweb2::globals::icingacli_bin $module_conf_dir = "${conf_dir}/modules/director" Exec { user => 'root', path => $::path, } icingaweb2::config::resource { 'icingaweb2-module-director': type => 'db', db_type => $db_type, host => $db_host, port => $db_port, db_name => $db_name, db_username => $db_username, db_password => $db_password, db_charset => $db_charset, } $db_settings = { 'module-director-db' => { 'section_name' => 'db', 'target' => "${module_conf_dir}/config.ini", 'settings' => { 'resource' => 'icingaweb2-module-director' } } } if $import_schema { ensure_packages(['icingacli'], { 'ensure' => 'present' }) exec { 'director-migration': command => "${icingacli_bin} director migration run", onlyif => "${icingacli_bin} director migration pending", require => [ Package['icingacli'], Icingaweb2::Module['director'] ] } if $kickstart { $kickstart_settings = { 'module-director-config' => { 'section_name' => 'config', 'target' => "${module_conf_dir}/kickstart.ini", 'settings' => { 'endpoint' => $endpoint, 'host' => $api_host, 'port' => $api_port, 'username' => $api_username, 'password' => $api_password, } } } exec { 'director-kickstart': command => "${icingacli_bin} director kickstart run", onlyif => "${icingacli_bin} director kickstart required", require => Exec['director-migration'] } } else { $kickstart_settings = {} } } else { $kickstart_settings = {} } icingaweb2::module {'director': ensure => $ensure, git_repository => $git_repository, git_revision => $git_revision, + install_method => $install_method, + package_name => $package_name, settings => merge($db_settings, $kickstart_settings), } } diff --git a/manifests/module/elasticsearch.pp b/manifests/module/elasticsearch.pp index a1be6e2..3e12841 100644 --- a/manifests/module/elasticsearch.pp +++ b/manifests/module/elasticsearch.pp @@ -1,80 +1,90 @@ # @summary # 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`. # # @param [Enum['absent', 'present']] ensure # Enable or disable module. # # @param [String] git_repository # Set a git repository URL. # +# @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 [Optional[String]] git_revision # Set either a branch or a tag name, eg. `master` or `v1.3.2`. # # @param [Optional[Hash]] instances # 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. # # @param [Optional[Hash]] eventtypes # 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. # # @example # 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', # } # } # } # class icingaweb2::module::elasticsearch( - String $git_repository, - Enum['absent', 'present'] $ensure = 'present', - Optional[String] $git_revision = undef, - Optional[Hash] $instances = undef, - Optional[Hash] $eventtypes = undef, + Enum['absent', 'present'] $ensure = 'present', + String $git_repository = 'https://github.com/Icinga/icingaweb2-module-elasticsearch.git', + Optional[String] $git_revision = undef, + Enum['git', 'none', 'package'] $install_method = 'git', + String $package_name = 'icingaweb2-module-elasticsearch', + Optional[Hash] $instances = undef, + Optional[Hash] $eventtypes = undef, ){ if $instances { $instances.each |$name, $setting| { icingaweb2::module::elasticsearch::instance{ $name: uri => $setting['uri'], user => $setting['user'], password => $setting['password'], ca => $setting['ca'], client_certificate => $setting['client_certificate'], client_private_key => $setting['client_private_key'], } } } if $eventtypes { $eventtypes.each |$name, $setting| { icingaweb2::module::elasticsearch::eventtype { $name: instance => $setting['instance'], index => $setting['index'], filter => $setting['filter'], fields => $setting['fields'], } } } icingaweb2::module { 'elasticsearch': ensure => $ensure, git_repository => $git_repository, git_revision => $git_revision, + install_method => $install_method, + package_name => $package_name, } } diff --git a/manifests/module/fileshipper.pp b/manifests/module/fileshipper.pp index 1c528ad..509f38a 100644 --- a/manifests/module/fileshipper.pp +++ b/manifests/module/fileshipper.pp @@ -1,73 +1,83 @@ # @summary # The fileshipper module extends the Director. It offers import sources to deal with CSV, JSON, YAML and XML files. # # @note If you want to use `git` as `install_method`, the CLI `git` command has to be installed. You can manage it yourself as package resource or declare the package name in icingaweb2 class parameter `extra_packages`. # # @param [Enum['absent', 'present']] ensure # Enables or disables module. # # @param [String] git_repository # Set a git repository URL. # +# @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 [Optional[String]] git_revision # Set either a branch or a tag name, eg. `master` or `v1.3.2`. # # @param [Hash] base_directories # Hash of base directories. These directories can later be selected in the import source (Director). # # @param [Hash] directories # Deploy plain Icinga 2 configuration files through the Director to your Icinga 2 master. # # @note To understand this modulei, please read [Fileshipper module documentation](https://www.icinga.com/docs/director/latest/fileshipper/doc/02-Installation/). # # @note You've to manage source and target directories yourself. # # @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', # } # } # } # class icingaweb2::module::fileshipper( - String $git_repository, - Enum['absent', 'present'] $ensure = 'present', - Optional[String] $git_revision = undef, - Hash $base_directories = {}, - Hash $directories = {}, + Enum['absent', 'present'] $ensure = 'present', + String $git_repository = 'https://github.com/Icinga/icingaweb2-module-fileshipper.git', + Optional[String] $git_revision = undef, + Enum['git', 'none', 'package'] $install_method = 'git', + String $package_name = 'icingaweb2-module-fileshipper', + Hash $base_directories = {}, + Hash $directories = {}, ){ $conf_dir = $::icingaweb2::globals::conf_dir $module_conf_dir = "${conf_dir}/modules/fileshipper" if $base_directories { $base_directories.each |$identifier, $directory| { icingaweb2::module::fileshipper::basedir{$identifier: basedir => $directory, } } } if $directories { $directories.each |$identifier, $settings| { icingaweb2::module::fileshipper::directory{$identifier: source => $settings['source'], target => $settings['target'], extensions => $settings['extensions'], } } } icingaweb2::module { 'fileshipper': ensure => $ensure, git_repository => $git_repository, git_revision => $git_revision, + install_method => $install_method, + package_name => $package_name, } } diff --git a/manifests/module/generictts.pp b/manifests/module/generictts.pp index 9db884c..cd9e505 100644 --- a/manifests/module/generictts.pp +++ b/manifests/module/generictts.pp @@ -1,44 +1,54 @@ # @summary # 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`. # # @param [Enum['absent', 'present']] ensure # Enable or disable module. # # @param [String] git_repository # Set a git repository URL. # # @param [Optional[String]] git_revision # Set either a branch or a tag name, eg. `master` or `v2.0.0`. # +# @parame [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 [Hash] ticketsystems # 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`. # # @example # 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', # }, # }, # } # class icingaweb2::module::generictts( - String $git_repository, - Enum['absent', 'present'] $ensure = 'present', - Optional[String] $git_revision = undef, - Hash $ticketsystems = {}, + Enum['absent', 'present'] $ensure = 'present', + String $git_repository = 'https://github.com/Icinga/icingaweb2-module-generictts.git', + Optional[String] $git_revision = undef, + Enum['git', 'none', 'package'] $install_method = 'git', + String $package_name = 'icingaweb2-module-generictts', + Hash $ticketsystems = {}, ){ create_resources('icingaweb2::module::generictts::ticketsystem', $ticketsystems) icingaweb2::module {'generictts': ensure => $ensure, git_repository => $git_repository, git_revision => $git_revision, + install_method => $install_method, + package_name => $package_name, } } diff --git a/manifests/module/graphite.pp b/manifests/module/graphite.pp index d87a804..f8bcd39 100644 --- a/manifests/module/graphite.pp +++ b/manifests/module/graphite.pp @@ -1,82 +1,89 @@ # @summary # 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`. # # @param [Enum['absent', 'present']] ensure # Enables or disables module. # # @param [String] git_repository # Set a git repository URL. # -# @param [Optional[String]] git_revision -# Set either a branch or a tag name, eg. `master` or `v1.3.2`. +# @param [Enum['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 [Optional[String]] url # URL to your Graphite Web/API. # # @param [Optional[String]] user # A user with access to your Graphite Web via HTTP basic authentication. # # @param [Optional[String]] password # The users password. # # @param [Optional[String]] graphite_writer_host_name_template # The value of your Icinga 2 GraphiteWriter's attribute `host_name_template` (if specified). # # @param [Optional[String]] graphite_writer_service_name_template # The value of your icinga 2 GraphiteWriter's attribute `service_name_template` (if specified). # # @note Here the official [Graphite module documentation](https://www.icinga.com/docs/graphite/latest/) can be found. # # @example # class { 'icingaweb2::module::graphite': # git_revision => 'v0.9.0', # url => 'https://localhost:8080' # } # class icingaweb2::module::graphite( - String $git_repository, - Enum['absent', 'present'] $ensure = 'present', - Optional[String] $git_revision = undef, - Optional[String] $url = undef, - Optional[String] $user = undef, - Optional[String] $password = undef, - Optional[String] $graphite_writer_host_name_template = undef, - Optional[String] $graphite_writer_service_name_template = undef + Enum['absent', 'present'] $ensure = 'present', + String $git_repository = 'https://github.com/Icinga/icingaweb2-module-graphite.git', + Optional[String] $git_revision = undef, + Enum['git', 'none', 'package'] $install_method = 'git', + String $package_name = 'icingaweb2-module-graphite', + Optional[String] $url = undef, + Optional[String] $user = undef, + Optional[String] $password = undef, + Optional[String] $graphite_writer_host_name_template = undef, + Optional[String] $graphite_writer_service_name_template = undef ){ $conf_dir = $::icingaweb2::globals::conf_dir $module_conf_dir = "${conf_dir}/modules/graphite" $graphite_settings = { 'url' => $url, 'user' => $user, 'password' => $password, } $icinga_settings = { 'graphite_writer_host_name_template' => $graphite_writer_host_name_template, 'graphite_writer_service_name_template' => $graphite_writer_service_name_template, } $settings = { 'module-graphite-graphite' => { 'section_name' => 'graphite', 'target' => "${module_conf_dir}/config.ini", 'settings' => delete_undef_values($graphite_settings) }, 'module-graphite-icinga' => { 'section_name' => 'icinga', 'target' => "${module_conf_dir}/config.ini", 'settings' => delete_undef_values($icinga_settings) } } icingaweb2::module { 'graphite': ensure => $ensure, git_repository => $git_repository, git_revision => $git_revision, + install_method => $install_method, + package_name => $package_name, settings => $settings, } } diff --git a/manifests/module/puppetdb.pp b/manifests/module/puppetdb.pp index 9e03630..9087783 100644 --- a/manifests/module/puppetdb.pp +++ b/manifests/module/puppetdb.pp @@ -1,134 +1,144 @@ # @summary # 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`. # # @param [Enum['absent', 'present']] ensure # Enable or disable module. # # @param [String] git_repository # Set a git repository URL. # # @param [Optional[String]] git_revision # Set either a branch or a tag name, eg. `master` or `v1.3.2`. # +# @param [Enum['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['none', 'puppet']] ssl # How to set up ssl certificates. To copy certificates from the local puppet installation, use `puppet`. # # @param [Optional[Stdlib::Host]] host # Hostname of the server where PuppetDB is running. The `ssl` parameter needs to be set to `puppet`. # # @param [Hash] certificates # Hash with icingaweb2::module::puppetdb::certificate resources. # # @note The [PuppetDB module documentation](https://www.icinga.com/docs/director/latest/puppetdb/doc/01-Installation/). # # @example Set up the PuppetDB module and configure two custom SSL keys: # $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, # } # # @example Set up the PuppetDB module and configure the hosts SSL key to connect to the PuppetDB host: # class {'::icingaweb2::module::puppetdb': # git_revision => 'master', # ssl => 'puppet', # host => 'puppetdb.example.com', # } # class icingaweb2::module::puppetdb( - String $git_repository, - Enum['absent', 'present'] $ensure = 'present', - Optional[String] $git_revision = undef, - Enum['none', 'puppet'] $ssl = 'none', - Optional[Stdlib::Host] $host = undef, - Hash $certificates = {}, + Enum['absent', 'present'] $ensure = 'present', + String $git_repository = 'https://github.com/Icinga/icingaweb2-module-puppetdb.git', + Optional[String] $git_revision = undef, + Enum['git', 'none', 'package'] $install_method = 'git', + String $package_name = 'icingaweb2-module-puppetdb', + Enum['none', 'puppet'] $ssl = 'none', + Optional[String] $host = undef, + Hash $certificates = {}, ){ $conf_dir = "${::icingaweb2::globals::conf_dir}/modules/puppetdb" $ssl_dir = "${conf_dir}/ssl" $conf_user = $::icingaweb2::conf_user $conf_group = $::icingaweb2::conf_group file { $ssl_dir: ensure => 'directory', group => $conf_group, owner => $conf_user, mode => '2740', purge => true, force => true, recurse => true, } case $ssl { 'puppet': { $puppetdb_ssldir = "${ssl_dir}/${host}" file { [$puppetdb_ssldir, "${puppetdb_ssldir}/private_keys", "${puppetdb_ssldir}/certs"]: ensure => 'directory', group => $conf_group, owner => $conf_user, mode => '2740', purge => true, force => true, recurse => true, } file { "${puppetdb_ssldir}/certs/ca.pem": ensure => 'present', group => $conf_group, owner => $conf_user, mode => '0640', source => "${::settings::ssldir}/certs/ca.pem", } $combinedkey_path = "${puppetdb_ssldir}/private_keys/${::fqdn}_combined.pem" notice($::settings::ssldir) concat { $combinedkey_path: ensure => present, warn => false, owner => $conf_user, group => $conf_group, mode => '0640', ensure_newline => true, } concat::fragment { 'private_key': target => $combinedkey_path, source => "${::settings::ssldir}/private_keys/${::fqdn}.pem", order => 1, } concat::fragment { 'public_key': target => $combinedkey_path, source => "${::settings::ssldir}/certs/${::fqdn}.pem", order => 2, } } # puppet 'none': { } default: { } } # case ssl create_resources('icingaweb2::module::puppetdb::certificate',$certificates) icingaweb2::module {'puppetdb': ensure => $ensure, git_repository => $git_repository, git_revision => $git_revision, + install_method => $install_method, + package_name => $package_name, } } diff --git a/manifests/module/vsphere.pp b/manifests/module/vsphere.pp index 581b8a7..d4fa6ad 100644 --- a/manifests/module/vsphere.pp +++ b/manifests/module/vsphere.pp @@ -1,28 +1,38 @@ # @summary # 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`. # # @param [Enum['absent', 'present']] ensure # Enable or disable module. # # @param [String] git_repository # Set a git repository URL. # +# @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 [Optional[String]] git_revision # Set either a branch or a tag name, eg. `stable/0.7.0` or `v0.7.0`. # # @note Check out the [vSphere module documentation](https://www.icinga.com/docs/director/latest/vsphere/doc/). # class icingaweb2::module::vsphere( - String $git_repository, - Enum['absent', 'present'] $ensure = 'present', - Optional[String] $git_revision = undef, + Enum['absent', 'present'] $ensure = 'present', + String $git_repository = 'https://github.com/Icinga/icingaweb2-module-vsphere.git', + Optional[String] $git_revision = undef, + Enum['git', 'none', 'package'] $install_method = 'git', + String $package_name = 'icingaweb2-module-vsphere', ){ icingaweb2::module { 'vsphere': ensure => $ensure, git_repository => $git_repository, git_revision => $git_revision, + install_method => $install_method, + package_name => $package_name, } }