Skip to content

Check $consul_version more correctly#303

Merged
solarkennedy merged 1 commit intovoxpupuli:masterfrom
logic:patch-1
Dec 18, 2016
Merged

Check $consul_version more correctly#303
solarkennedy merged 1 commit intovoxpupuli:masterfrom
logic:patch-1

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