Puppet Function: requires_ubuntu

Defined in:
puppet/modules/wmflib/lib/puppet/parser/functions/requires_ubuntu.rb
Function type:
Ruby 3.x API

Overview

requires_ubuntu()Any

Returns:

  • (Any)


18
19
20
21
22
# File 'puppet/modules/wmflib/lib/puppet/parser/functions/requires_ubuntu.rb', line 18

newfunction(:requires_ubuntu, :arity => 1) do |args|
  Puppet::Parser::Functions.function(:ubuntu_version)
  fail(ArgumentError, 'requires_ubuntu(): string argument required') unless args.first.is_a?(String)
  fail(Puppet::ParseError, "Ubuntu #{args.first} required.") unless function_ubuntu_version(args)
end