Skip to content

Add a function to compare the OS version #972

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

Merged
merged 4 commits into from
Nov 27, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Readme Updated
  • Loading branch information
david22swan committed Nov 27, 2018
commit 2883c60fe48ec6e2c12b94162fb789788a423f1c
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1997,6 +1997,18 @@ function in Puppet for the many available type conversions.

*Type*: rvalue.

#### 'os_version_gte'

Checks to see if the OS version is at least a certain version. Note that only the major version is taken into account.

Example usage:
if os_version_gte('Debian', '9') { }
if os_version_gte('Ubuntu', '18.04') { }

Returns:
Boolean(0) # OS is below the given version.
Boolean(1) # OS is equal to or grater than the given version.

#### `parsejson`

Converts a string of JSON into the correct Puppet structure (as a hash, array, string, integer, or a combination of such).
Expand Down