aboutsummaryrefslogtreecommitdiff
path: root/lib/puppet/parser/functions
diff options
context:
space:
mode:
authorMicah <micah@riseup.net>2017-02-24 20:29:01 +0000
committerMicah <micah@riseup.net>2017-02-24 20:29:01 +0000
commitb1f720160730b49971e431deaef207353fa886ca (patch)
tree60f3b60cf0121203612580ae0006fe8075f66dde /lib/puppet/parser/functions
parent9b3d0025a8a968499f5d24d76a66af0b7f1ba9cd (diff)
parent79690fdbe227f412c69e5e31198db7a19a281f50 (diff)
downloadpuppet-common-b1f720160730b49971e431deaef207353fa886ca.tar.gz
puppet-common-b1f720160730b49971e431deaef207353fa886ca.tar.bz2
Merge branch 'cleanup_functions' into 'master'
Cleanup functions See merge request !3
Diffstat (limited to 'lib/puppet/parser/functions')
-rw-r--r--lib/puppet/parser/functions/get_default.rb15
-rw-r--r--lib/puppet/parser/functions/hostname.rb13
2 files changed, 0 insertions, 28 deletions
diff --git a/lib/puppet/parser/functions/get_default.rb b/lib/puppet/parser/functions/get_default.rb
deleted file mode 100644
index 3f4359b..0000000
--- a/lib/puppet/parser/functions/get_default.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# get_default($value, $default) : $value
-#
-# return $value || $default.
-module Puppet::Parser::Functions
- newfunction(:get_default, :type => :rvalue) do |args|
- value = nil
- args.each { |x|
- if ! x.nil? and x.length > 0
- value = x
- break
- end
- }
- return value
- end
-end
diff --git a/lib/puppet/parser/functions/hostname.rb b/lib/puppet/parser/functions/hostname.rb
deleted file mode 100644
index 7bc477f..0000000
--- a/lib/puppet/parser/functions/hostname.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# get an uniq array of ipaddresses for a hostname
-require 'resolv'
-
-module Puppet::Parser::Functions
- newfunction(:hostname, :type => :rvalue) do |args|
- res = Array.new
- Resolv::DNS.new.each_address(args[0]){ |addr|
- res << addr
- }
- res.uniq
- end
-end
-