Skip to content

Commit

Permalink
Add Stdlib 9.x compatibility (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
cruelsmith authored Aug 14, 2023
1 parent 9345c30 commit 6c15d5a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions manifests/allinone.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}


if has_key($elasticsearch, 'version') {
if 'version' in $elasticsearch {
$es_version = $elasticsearch['version']
} else {
$es_version = '7.10.2'
Expand All @@ -34,7 +34,7 @@
}


if has_key($graylog, 'major_version') {
if 'major_version' in $graylog {
$graylog_major_version = $graylog['major_version']
} else {
$graylog_major_version = $graylog::params::major_version
Expand Down
9 changes: 3 additions & 6 deletions manifests/server.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class graylog::server(
$package_version = $graylog::params::package_version,
$config = undef,
Hash $config = undef,
$user = $graylog::params::server_user,
$group = $graylog::params::server_group,
$ensure = running,
Expand All @@ -13,15 +13,12 @@
if $config == undef {
fail('Missing "config" setting!')
}
if ! is_hash($config) {
fail('$config needs to be a hash data type!')
}

# Check mandatory settings
if ! has_key($config, 'password_secret') {
unless 'password_secret' in $config {
fail('Missing "password_secret" config setting!')
}
if has_key($config, 'root_password_sha2') {
if 'root_password_sha2' in $config {
if length($config['root_password_sha2']) < 64 {
fail('The root_password_sha2 parameter does not look like a SHA256 checksum!')
}
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dependencies": [
{
"name": "puppetlabs/stdlib",
"version_requirement": ">= 4.16.0 < 8.0.0"
"version_requirement": ">= 4.16.0 < 10.0.0"
},
{
"name": "puppetlabs/apt",
Expand Down

0 comments on commit 6c15d5a

Please sign in to comment.