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

Check $consul_version more correctly #303

Merged
merged 1 commit into from
Dec 18, 2016
Merged

Conversation

logic
Copy link
Contributor

@logic logic commented Dec 17, 2016

If we are using puppet-consul to download and install consul for us, initially $::consul_version will be undefined (because no executable could be found). This change makes the version check fail so we proceed with an installation (but without a puppet undefined variable error, which halts execution entirely, causing installation to fail).

There might be a better way to solve this, but it's been working for me. :)

If we are using puppet-consul to download and install consul for us, initially `$::consul_version` will be undefined (because no executable could be found). This change makes the version check fail so we proceed with an installation (but without a puppet undefined variable error, which halts execution entirely, causing installation to fail).

There might be a better way to solve this, but it's been working for me. :)
@solarkennedy
Copy link
Contributor

You are correct, this is the proper way to deal with variables that may not exist. (esp with strict_variables on)

@solarkennedy solarkennedy merged commit 0f26a1d into voxpupuli:master Dec 18, 2016
@logic logic deleted the patch-1 branch December 19, 2016 05:47
spuder pushed a commit to spuder/puppet-consul that referenced this pull request Feb 25, 2020
Check $::consul_version more correctly
@smortex smortex changed the title Check $::consul_version more correctly Check $consul_version more correctly Nov 23, 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.

2 participants