-
-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,14 +12,17 @@ | |
|
||
def with_debian_facts | ||
let :facts do | ||
super().merge(operatingsystemmajrelease: '6', | ||
lsbdistcodename: 'squeeze', | ||
lsbdistid: 'Debian', | ||
osfamily: 'Debian', | ||
os: { | ||
name: 'Debian', | ||
release: { full: '6.0' } | ||
}) | ||
super().merge( | ||
operatingsystemmajrelease: '6', | ||
lsbdistcodename: 'squeeze', | ||
lsbdistid: 'Debian', | ||
osfamily: 'Debian', | ||
os: | ||
{ | ||
name: 'Debian', | ||
release: { full: '6.0' } | ||
} | ||
) | ||
end | ||
end | ||
|
||
|
@@ -28,15 +31,24 @@ def with_openbsd_facts | |
# operatingsystemrelease may contain X.X-current | ||
# or other prefixes | ||
let :facts do | ||
super().merge(kernelversion: '5.9', | ||
osfamily: 'OpenBSD') | ||
super().merge( | ||
kernelversion: '5.9', | ||
osfamily: 'OpenBSD' | ||
) | ||
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 commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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. |
||
operatingsystemmajrelease: '7', | ||
osfamily: 'Redhat', | ||
os: | ||
{ | ||
name: 'CentOS', | ||
release: { major: '7' } | ||
} | ||
) | ||
end | ||
end | ||
|
||
|
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 😉