File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 478
478
assert_type(Pattern[/^(Debian|RedHat|windows)$/], $facts [' os' ][' family' ]) |$a , $b | {
479
479
fail(' This module only works on Debian, Red Hat or Windows based systems.' )
480
480
}
481
- if ($facts [' os' ][' family' ] == ' RedHat' ) and (versioncmp($facts [' os' ][' release' ][' major' ], ' 7' ) < 0) {
481
+ if ($facts [' os' ][' family' ] == ' RedHat' ) and ($facts [ ' os ' ][ ' name ' ] != ' Amazon ' ) and ( versioncmp($facts [' os' ][' release' ][' major' ], ' 7' ) < 0) {
482
482
fail(' This module only works on Red Hat based systems version 7 and higher.' )
483
+ } elsif ($facts [' os' ][' name' ] == ' Amazon' ) and ($facts [' os' ][' release' ][' major' ] != ' 2' ) and (versioncmp($facts [' os' ][' release' ][' major' ], ' 2022' ) < 0) {
484
+ fail(' This module only works on Amazon Linux 2 and newer systems.' )
483
485
}
484
486
}
485
487
You can’t perform that action at this time.
0 commit comments