You are browsing a read-only backup copy of Wikitech. The primary site can be found at


From Wikitech-static
Jump to navigation Jump to search

Documentation for this module may be created at Module:Puppet/doc (Test casesTest results)

return {
    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'
        table.insert( parts, 2, "manifests" )
        return "<code>[[phab:source/operations-puppet/browse/production/modules/" ..
        	table.concat(parts, "/") .. ".pp|" .. name .. "]]</code>"