2011-12-07 22:59:34 +00:00
|
|
|
module Puppet
|
|
|
|
module Modules
|
|
|
|
module CommonDirectories
|
|
|
|
def build_path(src_path, name, version)
|
|
|
|
File.join(src_path, "#{name}-#{version}")
|
|
|
|
end
|
|
|
|
|
|
|
|
def install_path(install_path, name, version)
|
|
|
|
File.join(install_path, "#{name}-#{version}")
|
|
|
|
end
|
|
|
|
|
|
|
|
def symlink_path(install_path, name)
|
|
|
|
File.join(install_path, name)
|
|
|
|
end
|
|
|
|
|
|
|
|
def bin_path(install_path, name)
|
|
|
|
File.join(install_path, name, 'bin')
|
|
|
|
end
|
|
|
|
|
|
|
|
def sbin_path(install_path, name)
|
|
|
|
File.join(install_path, name, 'sbin')
|
|
|
|
end
|
2011-12-08 13:58:22 +00:00
|
|
|
|
|
|
|
def pid_path(pid_path, name)
|
|
|
|
File.join(pid_path, "#{name}.pid")
|
|
|
|
end
|
2012-05-04 17:54:50 +00:00
|
|
|
|
|
|
|
def share_path(share_path, name)
|
|
|
|
File.join(share_path, name)
|
|
|
|
end
|
2012-05-08 19:10:26 +00:00
|
|
|
|
|
|
|
def data_path(data_path, name)
|
|
|
|
File.join(data_path, name)
|
|
|
|
end
|
2011-12-07 22:59:34 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class Puppet::Parser::Scope
|
|
|
|
include Puppet::Modules::CommonDirectories
|
|
|
|
end
|
2011-12-08 13:58:22 +00:00
|
|
|
|