From 33fabe02547a8c4b15278fe8636d83fe1354f4ae Mon Sep 17 00:00:00 2001 From: Raoul Bhatia Date: Sat, 28 May 2016 17:01:25 +0200 Subject: Ubuntu: Issue EOL warning for unsupported release. --- manifests/params.pp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'manifests') diff --git a/manifests/params.pp b/manifests/params.pp index 007464c..4451bf1 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -21,6 +21,7 @@ class unattended_upgrades::params { 'lsbdistid' => $::lsbdistid, 'lsbdistcodename' => $::lsbdistcodename, 'lsbmajdistrelease' => $::lsbmajdistrelease, + 'lsbdistrelease' => $::lsbdistrelease, } } else { # Strict variables facts lookup compatibility @@ -37,6 +38,10 @@ class unattended_upgrades::params { true => $::lsbmajdistrelease, default => undef, }, + 'lsbdistrelease' => defined('$lsbdistrelease') ? { + true => $::lsbdistrelease, + default => undef, + }, } } @@ -71,7 +76,7 @@ class unattended_upgrades::params { ] } - 'trusty', 'utopic', 'vivid', 'wily': { + 'trusty', 'wily': { $legacy_origin = true $origins = [ '${distro_id}:${distro_codename}-security', #lint:ignore:single_quote_string_with_variables @@ -84,6 +89,7 @@ class unattended_upgrades::params { ] } default: { + warning("Ubuntu ${xfacts['lsbdistrelease']} \"${xfacts['lsbdistcodename']}\" has reached End of Life - please upgrade!") $legacy_origin = true $origins = [ '${distro_id}:${distro_codename}-security', #lint:ignore:single_quote_string_with_variables -- cgit v1.2.3