You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2022/12/23 12:15:18 UTC

[whimsy] branch master updated: Fix up to work with Puppet 6

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new e1835883 Fix up to work with Puppet 6
e1835883 is described below

commit e1835883146feee6eafc440c2e0e34769a85dcbf
Author: Sebb <se...@apache.org>
AuthorDate: Fri Dec 23 12:15:13 2022 +0000

    Fix up to work with Puppet 6
---
 tools/vhosttest.rb | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/tools/vhosttest.rb b/tools/vhosttest.rb
index 43c1874a..a8995fb1 100755
--- a/tools/vhosttest.rb
+++ b/tools/vhosttest.rb
@@ -14,7 +14,8 @@ IP = ARGV.shift or raise RuntimeError.new "Need path to infrastructure puppet ch
 # Create dummy version of function to allow import
 module Puppet
   module Functions
-    def self.create_function(*args)
+    def self.create_function(*_args, &block)
+      block.call
     end
   end
 end
@@ -25,7 +26,10 @@ require "#{IP}/modules/vhosts_whimsy/lib/puppet/functions/preprocess_vhosts.rb"
 yaml = Dir["#{IP}/data/nodes/whimsy-vm*.apache.org.yaml"].
   max_by {|path| path[/-vm(\d+)/, 1].to_i}
 facts = YAML.load_file(yaml)['vhosts_whimsy::vhosts::vhosts']['whimsy-vm-443']
-ldap = ASF::LDAP::RO_HOSTS.join(' ') # to be closer to live site
+ldap = 'ldap-us.apache.org:636' # No longer defined in whimsy
 
-macros = Puppet::Functions::ApacheVHostMacros.new(facts, ldap)
-puts macros.result['custom_fragment']
+macros = ApacheVHostMacros.new(facts, ldap)
+puts macros.result['custom_fragment'].
+  gsub('%%{}', '%').
+  sub('%{apache::user}', 'www-data').
+  sub('%{apache::group}', 'www-data')