Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
module Puppet::Parser::Functions
  newfunction(:source_exists) do |args|
    dist = args[0]
    file = args[1]
    path = "/var/lib/puppet/dist/" + dist + file
    if File.exists?(path)
        return true
    else
        return false
    end
  end
end