You are browsing a read-only backup copy of Wikitech. The primary site can be found at wikitech.wikimedia.org
Module:Puppet
Revision as of 22:04, 4 December 2018 by imported>BryanDavis (Rename puppet.module to puppet.manifest with a temporary backcompat alias)
Documentation for this module may be created at Module:Puppet/doc (Test cases • Test results)
local manifest = function (frame)
-- turn a Puppet manifest name like "::foo::bar::baz" into a link to the source
local name = frame.args[1]
local parts = mw.text.split(mw.text.trim(name, ":"), '::', true)
if #parts == 1 then
parts[2] = 'init'
end
table.insert( parts, 2, "manifests" )
return "<code>[[phab:source/operations-puppet/browse/production/modules/" ..
table.concat(parts, "/") .. ".pp|" .. name .. "]]</code>"
end
return {
module = manifest, -- temporary alias for backcompat
manifest = manifest
}