This repository has been archived by the owner on Jul 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a feature to confine the provider.
We were using the pyenv_binary fact hack to work around the fact that we couldn't defer provider evaluation until the vcsrepo resource had completed. Turns out we can, by defining a feature which currently looks for the Fact pyenv_binary and if that is not found looks for our default of /usr/local/bin/pyenv. Now resource evaluation will be deferred until the provider becomes suitable. If that never happens the resources will simply not be evaluated.
- Loading branch information
Daniele Sluijters
committed
Apr 30, 2014
1 parent
a6d714b
commit d6552b5
Showing
4 changed files
with
10 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require 'puppet/util/feature' | ||
|
||
Puppet.features.add(:pyenv) { | ||
if not Facter.value('pyenv_binary').nil? | ||
File.executable?(Facter.value('pyenv_binary')) | ||
else | ||
File.executable?('/usr/local/bin/pyenv') | ||
end | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters