-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5de4273
commit 2d44c7b
Showing
3 changed files
with
32 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
# CHANGELOG | ||
|
||
## 0.1.15 | ||
|
||
* added **retcode2bool** function | ||
|
||
## 0.1.14 | ||
|
||
* added **eypconf_projectid** | ||
|
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,27 @@ | ||
# shamesly stolen from: https://github.com/puppetlabs/puppetlabs-apache/blob/master/lib/puppet/parser/functions/bool2httpd.rb | ||
# with minor changes | ||
# | ||
# | ||
#Copyright (C) 2012 Puppet Labs Inc | ||
# | ||
#Puppet Labs can be contacted at: [email protected] | ||
# | ||
#Licensed under the Apache License, Version 2.0 (the "License"); | ||
# | ||
# | ||
Puppet::Parser::Functions::newfunction(:retcode2bool, :type => :rvalue, :doc => <<-EOS | ||
Tranform a return code to a bool: | ||
0: true | ||
other return codes: false | ||
EOS | ||
) do |args| | ||
raise(Puppet::ParseError, "retcode2bool() wrong number of arguments. #{args.size} vs 1)") if args.size != 1 | ||
|
||
arg = args[0] | ||
|
||
if arg == 0 | ||
return true | ||
else | ||
return false | ||
end | ||
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