Skip to content

Commit

Permalink
Merge pull request #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 d4d7e66 + ef54fcc commit 8a2a029
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 8a2a029

Please sign in to comment.