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

fix(configure_license): use version_compare #172

Merged
merged 3 commits into from
Feb 8, 2023

Conversation

zyphermonkey
Copy link
Contributor

comparing float doesn't work with MAJOR.MINOR.PATCH semantic versioning Splunk uses.

comparing float doesn't work with MAJOR.MINOR.PATCH semantic versioning Splunk uses.
@@ -5,7 +5,7 @@

- name: Setting licensing mode based on Splunk version number
set_fact:
mode_option: "{% if splunk_version_release | float < 9.0 %}master{% else %}manager{% endif %}_uri"
mode_option: "{{ splunk_version_release is version_compare('9.0', '<') | ternary('master_uri', 'manager_uri') }}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. version_compare is now version. I am using it here.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested, seems to be working fine.

Just a nit-pick, can you just change version_compare to version? It was renamed in version 2.5 reference

@dtwersky dtwersky merged commit df95bf3 into splunk:master Feb 8, 2023
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.

3 participants