Skip to content
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

Configurer improved version matching (allow RHEL >= 7.4, < 8.0) #1489

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

kke
Copy link
Contributor

@kke kke commented Oct 1, 2019

Makes it possible to define more advanced host configurer version matchers. Currently it's only possible to list each version separately:

Before:

class Rhel7 < Configurer
  register_config 'rhel', '7.4'
  register_config 'rhel', '7.5'
  register_config 'rhel', '7.6'
  register_config 'rhel', '7.7'
end

After:

class Rhel7 < Configurer
  register_config 'rhel', /^7\.[4-9]|\d{2,}/
end

This has been used in this PR to make the rhel7 configurer match RHEL >= 7.4 && < 8.0. (Including something like 7.19-beta2.rc4)

The matcher can be anything that handles triple equals.

@kke kke added the enhancement New feature or request label Oct 1, 2019
@@ -13,7 +15,7 @@ def self.load_configurers

# @return [Array]
def self.configurers
@configurers ||= []
@configurers ||= Set.new
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated, but I don't see why it should iterate through the same class multiple times when searching for a match.

@kke kke changed the title Configurer version regex matching (allow RHEL >= 7.4, < 8.0) Configurer improved version matching (allow RHEL >= 7.4, < 8.0) Oct 1, 2019
@kke kke requested a review from jakolehm October 2, 2019 05:40
@peterwvj
Copy link

peterwvj commented Jan 26, 2021

Any progress on this? Is it possible that we could merge this any time soon? @kke @jakolehm Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants