Fix monit version fact - #71
Conversation
fixing Amazon Linux 2 support. Monit defaults to reading monitrc file…
The facter code did not detect versions with 2 dots, fixed the detection so it works with 2 and 3 digits.
|
I can see why the test is failing. But the test looks for Amazon linux, that is not even configured in the params. So I'd say the test is wrong. |
|
@erik-frontify thanks for the PR! Could you please rebase and add a unit test for the new format? |
|
Hey @bastelfreak, I didn't change anything on the format. AFAICT the configuration didn't change from monit 5 to monit 6. It just failed to gather the current monit version. Which is weird, as the fact regex should've failed before the update, as it was 3 digits before: The failing test is wrong IMO, as there is no case for Amazon Linux any more. I can provide a PR for that, just didn't want to mess with your tests |
Pull Request (PR) description
Looks like monit version 6 has 3 digits to the version. At least on CentOS:
This is Monit version 6.0.0So this PR adjusts the regex to still be able to see the current monit version