Skip to content

Commit

Permalink
Merge pull request garethr#667 from aspectcapital/redhat-vs-centos
Browse files Browse the repository at this point in the history
Test against OS family rather than name
  • Loading branch information
michaeltlombardi authored Oct 16, 2020
2 parents 2642a08 + 5c58ad6 commit 1149d7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,8 @@
}
}

if ($facts['os']['name'] == 'CentOS') and (versioncmp($facts['os']['release']['major'], '7') < 0) {
fail(translate('This module only works on CentOS version 7 and higher based systems.'))
if ($facts['os']['family'] == 'RedHat') and (versioncmp($facts['os']['release']['major'], '7') < 0) {
fail(translate('This module only works on Red Hat based systems version 7 and higher.'))
}

if ($default_gateway) and (!$bridge) {
Expand Down

0 comments on commit 1149d7b

Please sign in to comment.