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

Switch $releasevar to ${::os[release][major]} #577

Merged
merged 1 commit into from
Aug 30, 2017

Conversation

wyardley
Copy link
Contributor

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).

@wyardley wyardley added the bug Something isn't working label Aug 30, 2017
@@ -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",
Copy link
Member

Choose a reason for hiding this comment

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

👍 for structured facts

Copy link
Member

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?

Copy link
Contributor Author

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 😉

@@ -36,7 +36,11 @@ def with_openbsd_facts
def with_redhat_facts
let :facts do
super().merge(operatingsystemmajrelease: '7',
Copy link
Member

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?

@wyardley wyardley force-pushed the fix_rhel_repo_path branch from cc219dd to 37d5fa4 Compare August 30, 2017 20:41
end
end

def with_redhat_facts
let :facts do
super().merge(operatingsystemmajrelease: '7',
osfamily: 'Redhat')
super().merge(
Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@wyardley wyardley force-pushed the fix_rhel_repo_path branch from 37d5fa4 to 737c52c Compare August 30, 2017 20:49
@wyardley wyardley force-pushed the fix_rhel_repo_path branch from 737c52c to 8e17b30 Compare August 30, 2017 20:51
@bastelfreak bastelfreak merged commit 863fce7 into voxpupuli:master Aug 30, 2017
@wyardley wyardley deleted the fix_rhel_repo_path branch September 6, 2017 04:22
slm0n87 pushed a commit to slm0n87/puppet-rabbitmq that referenced this pull request Mar 7, 2019
Switch $releasevar to ${::os[release][major]}
cegeka-jenkins pushed a commit to cegeka/puppet-rabbitmq that referenced this pull request Mar 26, 2021
Switch $releasevar to ${::os[release][major]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants