move plugin directory to fit new 0.25 style

This commit is contained in:
mh 2009-10-31 15:16:37 +01:00 committed by Micah Anderson
parent 37b37ae82f
commit 97e15ea5a8
12 changed files with 13 additions and 39 deletions

View file

@ -0,0 +1,13 @@
# 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

View file

@ -1,39 +0,0 @@
# common/manifests/classes/lsb_release.pp -- request the installation of
# lsb_release to get to lsbdistcodename, which is used throughout the manifests
#
# Copyright (C) 2007 David Schmitt <david@schmitt.edv-bus.at>
# See LICENSE for the full license granted to you.
# Changelog:
# 2007-08-26: micah <micah@riseup.net> reported, that lsb_release can report
# nonsensical values for lsbdistcodename; assert_lsbdistcodename now
# recognises "n/a" and acts accordingly
# This lightweight class only asserts that $lsbdistcodename is set.
# If the assertion fails, an error is printed on the server
#
# To fail individual resources on a missing lsbdistcodename, require
# Exec[assert_lsbdistcodename] on the specific resource
class assert_lsbdistcodename {
case $lsbdistcodename {
'': {
err("Please install lsb_release or set facter_lsbdistcodename in the environment of $fqdn")
}
'n/a': {
case $operatingsystem {
"Debian": {
err("lsb_release was unable to report your distcodename; This seems to indicate a broken apt/sources.list on $fqdn")
}
default: {
err("lsb_release was unable to report your distcodename; please set facter_lsbdistcodename in the environment of $fqdn")
}
}
exec { "false # assert_lsbdistcodename": alias => assert_lsbdistcodename }
}
}
}
# To fail the complete compilation, include this class
class require_lsbdistcodename inherits assert_lsbdistcodename {}