Puppet Function: wmflib::compile_redirects

Defined in:
modules/wmflib/lib/puppet/functions/wmflib/compile_redirects.rb
Function type:
Ruby 4.x API

Overview

wmflib::compile_redirects(String $data, Optional[Enum["apache", "nginx"]] $web_server)String

Parameters:

  • data (String)
  • web_server (Optional[Enum["apache", "nginx"]])

Returns:



374
375
376
377
378
379
380
381
382
383
384
# File 'modules/wmflib/lib/puppet/functions/wmflib/compile_redirects.rb', line 374

Puppet::Functions.create_function(:'wmflib::compile_redirects') do
  dispatch :compile_redirects do
    param 'String', :data
    optional_param 'Enum["apache", "nginx"]', :web_server
    return_type 'String'
  end
  def compile_redirects(data, web_server = 'apache')
    parser = DomainRedirects::Parser.new(data, web_server)
    parser.parse
  end
end