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

Create os_release plugin for parsing data from /etc/os-release #1645

Merged
merged 1 commit into from Apr 7, 2021

Conversation

ramereth
Copy link
Contributor

@ramereth ramereth commented Apr 7, 2021

On newer Linux systems which use systemd, they should include /etc/os-release [1] which includes a lot of platform information that can be useful downstream.

[1] https://www.freedesktop.org/software/systemd/man/os-release.html

NOTE: If accepted, I'll make a separate PR which will update linux/platform to depend on this plugin and optimize the use of reading /etc/os-release in multiple places. This can also be useful in chef/chef#11296 in case lsb_release isn't available. I didn't want to include this in this PR in case we could back port this to 16.

Signed-off-by: Lance Albertson lance@osuosl.org

On newer Linux systems which use systemd, they should include /etc/os-release
[1] which includes a lot of platform information that can be useful downstream.

[1] https://www.freedesktop.org/software/systemd/man/os-release.html

Signed-off-by: Lance Albertson <lance@osuosl.org>
@ramereth ramereth requested review from a team as code owners April 7, 2021 01:00
@tas50 tas50 merged commit 5bf9f32 into chef:master Apr 7, 2021
@tas50
Copy link
Contributor

tas50 commented Apr 7, 2021

This is something I've wanted us to do here for a while. Nice work.

ramereth added a commit to ramereth/chef that referenced this pull request Apr 7, 2021
The redhat-lsb-core isn't install as a base package which includes lsb_release
so let's use os_release data first (if it's available) [1] and fall back to lsb
data.

[1] chef/ohai#1645

Signed-off-by: Lance Albertson <lance@osuosl.org>
ramereth added a commit to ramereth/chef that referenced this pull request Apr 8, 2021
The redhat-lsb-core isn't install as a base package which includes lsb_release
so let's use os_release data first (if it's available) [1] and fall back to lsb
data.

[1] chef/ohai#1645

Signed-off-by: Lance Albertson <lance@osuosl.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants