![]() Most Linux distributions ship an os-release file by default. Some do not ship lsb-release information, but they can be installed afterwards. Installing/Removing lsb-release can lead to different OS grain values. | OS | grain | without lsb-release | with lsb-release | |------------------|------------|----------------------------------|------------------| | AlmaLinux 8 | oscodename | AlmaLinux 8.5 (Arctic Sphynx) | ArcticSphynx | | Astra CE | os | Astra (Orel) | AstraLinuxCE | | Astra CE | os_family | Astra (Orel) | Debian | | Astra CE | osfullname | Astra Linux (Orel) | AstraLinuxCE | | Astra CE 2.12.40 | osfinger | Astra Linux (Orel)-2 | AstraLinuxCE-2 | | Debian | osfullname | Debian GNU/Linux | Debian | | Mendel | osfullname | Mendel GNU/Linux | Mendel | | Mendel 10 | osfinger | Mendel GNU/Linux-10 | Mendel-10 | | Mint | osfullname | Linux Mint | Linuxmint | | Mint 20.3 | osfinger | Linuxmint-20 | Linux Mint-20 | | Pop | osfullname | Pop!_OS | Pop | | Pop 20.04 | osfinger | Pop!_OS-20 | Pop-20 | | Rocky | osfullname | Rocky Linux | Rocky | | Rocky 8 | osfinger | Rocky Linux-8 | Rocky-8 | | Rocky 8 | oscodename | Rocky Linux 8.5 (Green Obsidian) | GreenObsidian | The current code that determines the OS grains on Linux is a mess: First lsb-release is queried. If that fails, fall back to read os-release and parse some `/etc/*-release` files. Then query `_linux_distribution` and use a mixtures of those for the OS grains. `_linux_distribution` queries the Python `distro` library. `distro` queries the os-release file, lsb-release, and then `/etc/*-release`. Rewrite the code that determines the OS grains on Linux. Solely rely on the data provided by the os-release file. To not cause regressions, only switch the distribution that has been tested. All other distributions will use the legacy code (which was moved to `_legacy_linux_distribution_data`). The new code derives the `os_family` grain from the `ID_LIKE` field from os-release (see https://github.com/saltstack/salt/issues/59061 for this feature request). To enable this feature, the new code needs to be used by default (and not just for selected distributions). This commit introduces a few changes to the OS grains: * AlmaLinux and Rocky Linux extract the codename from the `VERSION` field now instead of using the full `PRETTY_NAME`. * Mendel uses now `Mendel GNU/Linux` as `osfullname` and correctly extracts the `osrelease` from `PRETTY_NAME`. * Pop!_OS changes the `osfullname` from `Pop` to `Pop!_OS`. * Astra Linux changes the `osfullname` from `AstraLinuxCE` to `Astra Linux (Orel)` and `AstraLinuxSE` to `Astra Linux (Smolensk)` respectively. Fixes https://github.com/saltstack/salt/issues/61618 Signed-off-by: Benjamin Drung <benjamin.drung@ionos.com> |
||
---|---|---|
.github | ||
.pre-commit-hooks | ||
changelog | ||
cicd | ||
conf | ||
doc | ||
pkg | ||
requirements | ||
rfcs | ||
salt | ||
scripts | ||
tasks | ||
templates | ||
tests | ||
.bandit | ||
.codeclimate.yml | ||
.codecov.yml | ||
.coveragerc | ||
.editorconfig | ||
.git-blame-ignore-revs | ||
.gitattributes | ||
.gitignore | ||
.gitlab-ci.yml | ||
.mention-bot | ||
.pre-commit-config.yaml | ||
.pylintrc | ||
.rstcheck.cfg | ||
AUTHORS | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.rst | ||
DEPENDENCIES.md | ||
Gemfile | ||
kitchen.yml | ||
LICENSE | ||
MANIFEST.in | ||
noxfile.py | ||
pyproject.toml | ||
pytest.ini | ||
README.rst | ||
run.py | ||
SECURITY.md | ||
setup.cfg | ||
setup.py | ||
SUPPORT.rst |

- Latest Salt Documentation
- Open an issue (bug report, feature request, etc.)
Salt is the world’s fastest, most intelligent and scalable automation engine.
About Salt
Built on python, Salt uses simple and human-readable YAML combined with event-driven automation to deploy and configure complex IT systems. In addition to leveling-up vRealize Automation SaltStack Config, Salt can be found under the hood of products from Juniper, Cisco, Cloudflare, Nutanix, SUSE, and Tieto, to name a few.
About SaltStack
SaltStack was acquired by VMware in 2020. Salt Project remains an open source ecosystem that VMware supports and contributes to.
Download Salt
Salt is tested and packaged to run on CentOS, Debian, RHEL, Ubuntu, MacOS, Windows, and more. Download Salt and get started now.
Salt Project Documentation
Installation instructions, getting started guides, in-depth API documentation, and contributing to Salt.
Security Advisories
Keep an eye on the Salt Project Security Announcements landing page. Salt Project recommends subscribing to the Salt Project Security RSS feed to receive notification when new information is available regarding security announcements.
Other channels to receive security announcements include the Salt Community mailing list and the Salt Project Community Slack.
Responsibly Reporting Security Vulnerabilities
When reporting security vulnerabilities for Salt or other SaltStack projects, refer to the SECURITY.md file found in this repository.
Engage the Salt Project and The Community
Please be sure to review our Code of Conduct. Also, check out some of our community resources including:
- Salt Project Community Wiki
- Salt Project Community Slack
- Salt Project: IRC on LiberaChat
- Salt Project YouTube channel
- Salt Project Twitch channel
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Project Community Events Calendar on the main https://saltproject.io website.
If you have additional questions, email us at saltproject@vmware.com or reach out directly to the Community Manager, Janae Andrus via Slack. We’d be glad to have you join our community!
License
Salt is licensed under the Apache 2.0 license. Please see the LICENSE file for the full text of the Apache license, followed by a full summary of the licensing used by external modules.
A complete list of attributions and dependencies can be found here: salt/DEPENDENCIES.md