diff --git a/README.md b/README.md index 7ea71874..6012bbc3 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ And depends on: * [puppetlabs/concat] >= 2.1.0 < 8.0.0 * [icinga/icinga] >= 1.0.0 < 3.0.0 * needed if `manage_repos` is set to `true` -* [puppetlabs/chocolatey] +* [puppetlabs/chocolatey] >= 5.2.0 < 9.0.0 * needed if agent os is windows and if either `manage_package` or `manage_packages` is set to `true` ### Limitations diff --git a/functions/parse.pp b/functions/parse.pp index 5add3c12..ab7a2ad8 100644 --- a/functions/parse.pp +++ b/functions/parse.pp @@ -28,7 +28,7 @@ function icinga2::parse( icinga2::icinga2_attributes( $attrs, concat($icinga2::globals::reserved, $reserved), - merge($icinga2::_constants, $constants), + stdlib::merge($icinga2::_constants, $constants), $indent ) } diff --git a/manifests/feature/elasticsearch.pp b/manifests/feature/elasticsearch.pp index ba4a25f1..9df81bbb 100644 --- a/manifests/feature/elasticsearch.pp +++ b/manifests/feature/elasticsearch.pp @@ -158,7 +158,7 @@ icinga2::object { 'icinga2::object::ElasticsearchWriter::elasticsearch': object_name => 'elasticsearch', object_type => 'ElasticsearchWriter', - attrs => delete_undef_values(merge($attrs, $attrs_ssl)), + attrs => delete_undef_values(stdlib::merge($attrs, $attrs_ssl)), attrs_list => concat(keys($attrs), keys($attrs_ssl)), target => "${conf_dir}/features-available/elasticsearch.conf", notify => $_notify, diff --git a/manifests/feature/gelf.pp b/manifests/feature/gelf.pp index 97514412..4964b506 100644 --- a/manifests/feature/gelf.pp +++ b/manifests/feature/gelf.pp @@ -125,7 +125,7 @@ icinga2::object { 'icinga2::object::GelfWriter::gelf': object_name => 'gelf', object_type => 'GelfWriter', - attrs => delete_undef_values(merge($attrs, $attrs_ssl)), + attrs => delete_undef_values(stdlib::merge($attrs, $attrs_ssl)), attrs_list => concat(keys($attrs), keys($attrs_ssl)), target => "${conf_dir}/features-available/gelf.conf", order => 10, diff --git a/manifests/feature/icingadb.pp b/manifests/feature/icingadb.pp index b75c0e10..c28b0fc3 100644 --- a/manifests/feature/icingadb.pp +++ b/manifests/feature/icingadb.pp @@ -176,7 +176,7 @@ icinga2::object { 'icinga2::object::IcingaDB::icingadb': object_name => 'icingadb', object_type => 'IcingaDB', - attrs => delete_undef_values(merge($attrs, $attrs_tls)), + attrs => delete_undef_values(stdlib::merge($attrs, $attrs_tls)), attrs_list => concat(keys($attrs), keys($attrs_tls)), target => "${conf_dir}/features-available/icingadb.conf", order => 10, diff --git a/manifests/feature/idomysql.pp b/manifests/feature/idomysql.pp index d693e37c..d9d72572 100644 --- a/manifests/feature/idomysql.pp +++ b/manifests/feature/idomysql.pp @@ -247,7 +247,7 @@ icinga2::object { 'icinga2::object::IdoMysqlConnection::ido-mysql': object_name => 'ido-mysql', object_type => 'IdoMysqlConnection', - attrs => delete_undef_values(merge($attrs, $attrs_ssl)), + attrs => delete_undef_values(stdlib::merge($attrs, $attrs_ssl)), attrs_list => concat(keys($attrs), keys($attrs_ssl)), target => "${conf_dir}/features-available/ido-mysql.conf", order => 10, diff --git a/manifests/feature/idopgsql.pp b/manifests/feature/idopgsql.pp index 9edb5962..e733753f 100644 --- a/manifests/feature/idopgsql.pp +++ b/manifests/feature/idopgsql.pp @@ -228,7 +228,7 @@ icinga2::object { 'icinga2::object::IdoPgsqlConnection::ido-pgsql': object_name => 'ido-pgsql', object_type => 'IdoPgsqlConnection', - attrs => delete_undef_values(merge($attrs, $attrs_ssl)), + attrs => delete_undef_values(stdlib::merge($attrs, $attrs_ssl)), attrs_list => concat(keys($attrs), keys($attrs_ssl)), target => "${conf_dir}/features-available/ido-pgsql.conf", order => 10, diff --git a/manifests/feature/influxdb.pp b/manifests/feature/influxdb.pp index 515b38e1..b84ec795 100644 --- a/manifests/feature/influxdb.pp +++ b/manifests/feature/influxdb.pp @@ -201,7 +201,7 @@ icinga2::object { 'icinga2::object::InfluxdbWriter::influxdb': object_name => 'influxdb', object_type => 'InfluxdbWriter', - attrs => delete_undef_values(merge($attrs, $attrs_ssl)), + attrs => delete_undef_values(stdlib::merge($attrs, $attrs_ssl)), attrs_list => concat(keys($attrs), keys($attrs_ssl)), target => "${conf_dir}/features-available/influxdb.conf", notify => $_notify, diff --git a/manifests/feature/influxdb2.pp b/manifests/feature/influxdb2.pp index 16e11e13..e310b8a0 100644 --- a/manifests/feature/influxdb2.pp +++ b/manifests/feature/influxdb2.pp @@ -178,7 +178,7 @@ icinga2::object { 'icinga2::object::Influxdb2Writer::influxdb2': object_name => 'influxdb2', object_type => 'Influxdb2Writer', - attrs => delete_undef_values(merge($attrs, $attrs_ssl)), + attrs => delete_undef_values(stdlib::merge($attrs, $attrs_ssl)), attrs_list => concat(keys($attrs), keys($attrs_ssl)), target => "${conf_dir}/features-available/influxdb2.conf", notify => $_notify, diff --git a/manifests/globals.pp b/manifests/globals.pp index 2954f47f..61ba19aa 100644 --- a/manifests/globals.pp +++ b/manifests/globals.pp @@ -99,16 +99,5 @@ ) { assert_private() - if ( versioncmp($::facts['puppetversion'], '6' ) >= 0 and versioncmp(load_module_metadata('stdlib')['version'], '5.1.0') < 0 ) { - fail('You be affected by this bug: https://github.com/Icinga/puppet-icinga2/issues/505 so you should update your stdlib to version 5.1 or higher') - } - - # Logon account on Windows - if $facts['os']['kernel'] == 'windows' { - if $logon_account and versioncmp($::facts['puppetversion'], '6.18.0') < 0 { - fail('Using logon_account requieres a Puppet version 6.18 or higher') - } - } - $constants = lookup('icinga2::globals::constants', Hash, 'deep', {}) } diff --git a/manifests/init.pp b/manifests/init.pp index 0392feff..394d828a 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -138,7 +138,7 @@ $_reserved = $icinga2::globals::reserved # merge constants with defaults - $_constants = merge($icinga2::globals::constants, $constants) + $_constants = stdlib::merge($icinga2::globals::constants, $constants) # validate confd, boolean or string if $confd =~ Boolean { diff --git a/metadata.json b/metadata.json index d0768249..aaa58a01 100644 --- a/metadata.json +++ b/metadata.json @@ -10,11 +10,11 @@ "dependencies": [ { "name": "puppetlabs/stdlib", - "version_requirement": ">= 5.0.0 < 9.0.0" + "version_requirement": ">= 9.0.0 < 10.0.0" }, { "name": "puppetlabs/concat", - "version_requirement": ">= 2.1.0 < 8.0.0" + "version_requirement": ">= 6.4.0 < 10.0.0" } ], "operatingsystem_support": [ @@ -106,7 +106,7 @@ "requirements": [ { "name": "puppet", - "version_requirement": ">= 6.0.0 < 8.0.0" + "version_requirement": ">= 7.0.0 < 9.0.0" } ], "pdk-version": "2.5.0", diff --git a/templates/object.conf.epp b/templates/object.conf.epp index 44963324..6de478a9 100644 --- a/templates/object.conf.epp +++ b/templates/object.conf.epp @@ -11,7 +11,7 @@ Array $ignore = [], | -%> -<% $_attrs = merge($attrs, { 'assign where' => $assign, 'ignore where' => $ignore, }) -%> +<% $_attrs = stdlib::merge($attrs, { 'assign where' => $assign, 'ignore where' => $ignore, }) -%> <% if $apply =~ String { %>apply <%= $object_type -%> <% if $prefix { -%> <% if $prefix =~ String { %> "<%= $prefix %>"<% } else { -%>