Skip to content

Conversation

tj-cisco
Copy link
Contributor

Pull Request (PR) description

Allow setting python::version in hiera to an integer value to match the default option in install.pp. This is required for FreeBSD.

This Pull Request (PR) fixes the following issues

Fixes #731
Semi related to #688 as the solution in this PR does not work when configured via hiera.

@kenyon kenyon changed the title Allow setting python::version in hiera to Integer Allow setting python::version in hiera to Integer Sep 24, 2025
Allow setting `python::version` to an integer value to match the `default` option in `install.pp`. This is required for FreeBSD.
@kenyon kenyon force-pushed the version_pattern_fix branch from 8117ebc to 23a4331 Compare September 24, 2025 06:25
@kenyon kenyon merged commit 063e230 into voxpupuli:master Sep 24, 2025
16 checks passed
@alexjfisher
Copy link
Member

Was there an issue quoting the version 'number' in hiera? Version numbers really are strings and not numbers. They just sometimes look like integers or perhaps floats, but 1.0.0 could never be either.

@tj-cisco tj-cisco deleted the version_pattern_fix branch September 24, 2025 13:45
@tj-cisco
Copy link
Contributor Author

Was there an issue quoting the version 'number' in hiera? Version numbers really are strings and not numbers. They just sometimes look like integers or perhaps floats, but 1.0.0 could never be either.

TBH we never tried quoting it, but it probably would have matched the first option in the pattern. This fix doesn't address python::version: 3.9 as an unquoted string which the parser will treat as a Float, a semvar style version number will be treated as a string by the parser when it is unquoted which will match the first option in the pattern as the "python" prefix is optional.

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.

Define pip_package in hieradata
4 participants