Puppet Function: apache::bool2httpd
- Defined in:
-
lib/puppet/functions/apache/bool2httpd.rb
- Function type:
- Ruby 4.x API
Summary
Transform a supposed boolean to On or Off. Passes all other values through.
Overview
apache::bool2httpd(Any $arg) ⇒ Any
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/puppet/functions/apache/bool2httpd.rb', line 4
Puppet::Functions.create_function(:'apache::bool2httpd') do
def bool2httpd(arg)
return 'Off' if arg.nil? || arg == false || arg =~ %r{false}i || arg == :undef
return 'On' if arg == true || arg =~ %r{true}i
arg.to_s
end
end
|