Mercurial > repos > other > Puppet
view modules/website/lib/puppet/parser/functions/hash_to_csp.rb @ 312:490d7ec20172
Make firewall rule numbering consistent for Dovecot
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 23 Feb 2020 20:29:42 +0000 |
parents | 1e65604c182a |
children |
line wrap: on
line source
module Puppet::Parser::Functions newfunction(:hash_to_csp, :type => :rvalue) do |args| csp_defaults = args[0] csp_overrides = args[1] csp_combined = csp_defaults.merge(csp_overrides == "" ? {} : csp_overrides) csp_string = csp_combined.map { |index, value| "#{index} #{value}" }.join ("; ") end end