Puppet Function: stdlib::validate_domain_name
- Defined in:
-
lib/puppet/functions/stdlib/validate_domain_name.rb
- Function type:
- Ruby 4.x API
Summary
Validate that all values passed are syntactically correct domain names.
Fail compilation if any value fails this check.
Overview
stdlib::validate_domain_name(Variant[Stdlib::Fqdn, Stdlib::Dns::Zone] *$values) ⇒ Undef
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/puppet/functions/stdlib/validate_domain_name.rb', line 6
Puppet::Functions.create_function(:'stdlib::validate_domain_name') do
dispatch :validate_domain_name do
repeated_param 'Variant[Stdlib::Fqdn, Stdlib::Dns::Zone]', :values
end
def validate_domain_name(*args)
assert_arg_count(args)
end
def assert_arg_count(args)
raise(ArgumentError, 'stdlib::validate_domain_name(): Wrong number of arguments need at least one') if args.empty?
end
end
|