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

provide proper default for $r10k_basedir #440

Merged
merged 1 commit into from
Jul 5, 2018

Conversation

bastelfreak
Copy link
Member

The variable basically contains the value from the
puppet_environmentpath fact. The default is
/etc/puppetlabs/code/environments. We can safely fallback to the
default value if the fact is undef. This allows the module to work
properly during the first run.

Pull Request (PR) description

This Pull Request (PR) fixes the following issues

@bastelfreak bastelfreak added the enhancement New feature or request label Jul 5, 2018
@@ -10,7 +10,11 @@
$sources = undef
$puppet_master = true

$r10k_basedir = $facts['puppet_environmentpath']
if $facts['puppet_environmentpath'] {
Copy link
Contributor

Choose a reason for hiding this comment

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

helidbe recommends to use different construct :

if 'puppet_environment' in $facts

Copy link
Member Author

Choose a reason for hiding this comment

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

@hlindberg is there a technical reason for this? Is it a performance difference? The outcome at the end is the same.

The variable basically contains the value from the
puppet_environmentpath fact. The default is
/etc/puppetlabs/code/environments. We can safely fallback to the
default value if the fact is undef. This allows the module to work
properly during the first run.
@llowder llowder merged commit 0508645 into voxpupuli:master Jul 5, 2018
@bastelfreak bastelfreak deleted the envpath branch July 5, 2018 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants