-
-
Notifications
You must be signed in to change notification settings - Fork 498
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
Switch $releasevar to ${::os[release][major]} #577
Conversation
@@ -1,7 +1,7 @@ | |||
# Class: rabbitmq::repo::rhel | |||
# Makes sure that the Packagecloud repo is installed | |||
class rabbitmq::repo::rhel( | |||
$location = 'https://packagecloud.io/rabbitmq/rabbitmq-server/el/$releasever/$basearch', | |||
$location = "https://packagecloud.io/rabbitmq/rabbitmq-server/el/${::os[release][major]}/\$basearch", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 for structured facts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bonus points if you also use the $facts hash?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexjfisher should have thought of that... too bad it's already merged, but feel free to submit a PR 😉
spec/spec_helper_local.rb
Outdated
@@ -36,7 +36,11 @@ def with_openbsd_facts | |||
def with_redhat_facts | |||
let :facts do | |||
super().merge(operatingsystemmajrelease: '7', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpicking, but could you add a newline after the ( in line 38 and before the { in line 40?
cc219dd
to
37d5fa4
Compare
end | ||
end | ||
|
||
def with_redhat_facts | ||
let :facts do | ||
super().merge(operatingsystemmajrelease: '7', | ||
osfamily: 'Redhat') | ||
super().merge( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this what you had in mind? I think the previous layout may have just been what rubocop -a
did, or else copying the example of what was there before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed one more update, let me know if it looks right. It didn't look right when I indented the curly brace after the newline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you can probalby see, I also updated the Debian / OpenBSD facts.
But agree that we should rework this whole thing at some point.
37d5fa4
to
737c52c
Compare
737c52c
to
8e17b30
Compare
Switch $releasevar to ${::os[release][major]}
Switch $releasevar to ${::os[release][major]}
Proposed fix for #573 -- this works around the issue where RHEL wants to hit 7Client / 7Server instead of 7 (which Packagecloud doesn't seem to have setup as valid names).