-
-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove EOL operating systems, Legacy facts. #343
Conversation
I haven't replaced |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a good start to clean up the module.
manifests/params.pp
Outdated
$repo_class = '::nodejs::repo::nodesource' | ||
} | ||
elsif $::operatingsystemrelease =~ /^16.04$/ { | ||
elsif $facts['os']['release']['full'] =~ /^14.04$|^16.04$/ { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about /^1[46]\.04$/
for the regex?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
manifests/repo/nodesource.pp
Outdated
} | ||
|
||
elsif $::operatingsystemrelease =~ /^6\.(\d+)/ { | ||
if $facts['os']['release']['full'] =~ /^6\.(\d+)/ { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The major
should be there in facts too and doesn't need a regex. You can even simplify the later code to use those facts in $dist_version
and $name_string
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
manifests/repo/nodesource.pp
Outdated
# On EL 5, EPEL needs to be applied first | ||
Class['::epel'] -> Class['::nodejs::repo::nodesource::yum'] | ||
} | ||
|
||
} | ||
'Linux': { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can just remove the whole Linux block and allow it to fall back to the generic default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
spec/classes/nodejs_spec.rb
Outdated
facts[:operatingsystemrelease] == '10.04' || | ||
%w[7 8].include?(facts[:operatingsystemmajrelease]) | ||
) | ||
if facts[:os]['family'] == 'Debian' && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd extract this into a separate variable since it's reused a lot.
end | ||
|
||
['5.0', '6.0', '7.0', '25'].each do |operatingsystemrelease| | ||
['6.0', '7.0', '27'].each do |operatingsystemrelease| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and a lot below should be in on_supported_os
too. Could we reuse that instead of duplicating facts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm maybe. We also would need to filter CentOS/OracleLinux/Scientific Linux as we only want EL6/7 types tested once.
README.md
Outdated
module is installed. | ||
|
||
If using CentoOS/RHEL 5/6/7 and you wish to install Node.js from EPEL rather | ||
If using CentoOS/RHEL 6/7 and you wish to install Node.js from EPEL rather |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CentOS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
manifests/params.pp
Outdated
fail("The ${module_name} module is not supported on Debian Squeeze.") | ||
} | ||
elsif $::operatingsystemrelease =~ /^[78]\.(\d+)/ { | ||
if $facts['os']['release']['full'] =~ /^[89]\.(\d+)/ { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this use ['major'] =~ /^[89]$/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
manifests/params.pp
Outdated
@@ -102,7 +61,7 @@ | |||
'RedHat': { | |||
$legacy_debian_symlinks = false | |||
|
|||
if $::operatingsystemrelease =~ /^[5-7]\.(\d+)/ { | |||
if $facts['os']['release']['full'] =~ /^[6-7]\.(\d+)/ { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also use major?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
manifests/params.pp
Outdated
@@ -227,43 +185,10 @@ | |||
$repo_class = undef | |||
} | |||
'Linux': { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this adds little over the default failure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have dropped it.
- Update the `repo_url_suffix` table in the README, dropping EOL operating systems and adding new ones - Drop explicit handling of Debian 6 and 7 (EOL) - Drop explicit handling of Ubuntu 10.04 and 12.04 (EOL) - Drop explicit handling of EOL Fedora versions - Drop explicit handling of RHEL5 (EOL) - Add explicit handling of Debian 9 - Replace most Legacy facts with Modern facts using the new facts hash syntax. This explicitly drops support for Facter versions less than 3, which are not supported under Puppet4/5 anyway. - Drop explicit support for Amazon Linux versions less than 2015.03. Amazon Linux is rolling distribution, and earlier versions did not have Facter 3 - Use the Modern system32 fact Also: - Remove the old Puppetlabs footer from the README. Reference CONTRIBUTING.md instead - Perform minor doc fixes - Use less granular error handling
ec19dea
to
0427379
Compare
repo_url_suffix
table in the README, dropping EOLoperating systems and adding new ones
syntax. This explicitly drops support for Facter versions less than 3,
which are not supported under Puppet4/5 anyway.
Amazon Linux is rolling distribution, and earlier versions did not have
Facter 3
Also: