diff --git a/manifests/repository.pp b/manifests/repository.pp index 3fb38dd..ddc0f1c 100644 --- a/manifests/repository.pp +++ b/manifests/repository.pp @@ -7,16 +7,16 @@ anchor { 'graylog::repository::begin': } if $url == undef { - $graylog_repo_url = $::osfamily ? { + $graylog_repo_url = $facts['os']['family'] ? { 'debian' => 'https://downloads.graylog.org/repo/debian/', 'redhat' => "https://downloads.graylog.org/repo/el/${release}/${version}/\$basearch/", - default => fail("${::osfamily} is not supported!"), + default => fail("${facts['os']['family']} is not supported!"), } } else { $graylog_repo_url = $url } - case $::osfamily { + case $facts['os']['family'] { 'debian': { class { 'graylog::repository::apt': url => $graylog_repo_url, @@ -32,7 +32,7 @@ } } default: { - fail("${::osfamily} is not supported!") + fail("${facts['os']['family']} is not supported!") } } anchor { 'graylog::repository::end': } diff --git a/manifests/server.pp b/manifests/server.pp index e8b0b9a..c4114b1 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -50,7 +50,7 @@ content => template("${module_name}/server/graylog.conf.erb"), } - case $::osfamily { + case $facts['os']['family'] { 'debian': { file { '/etc/default/graylog-server': ensure => file, @@ -80,7 +80,7 @@ } } default: { - fail("${::osfamily} is not supported!") + fail("${facts['os']['family']} is not supported!") } } diff --git a/metadata.json b/metadata.json index 0b28ef5..cebc201 100644 --- a/metadata.json +++ b/metadata.json @@ -44,7 +44,7 @@ "requirements": [ { "name": "puppet", - "version_requirement": ">= 6.21.0 < 8.0.0" + "version_requirement": ">= 6.21.0 < 9.0.0" } ], "tags": [