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 c9095dd3 Allow override of basename of yaml
c9095dd3 is described below
commit c9095dd3be6895678f2bba0f3ea66630bb24487a
Author: Sebb <[email protected]>
AuthorDate: Fri Jan 19 13:25:10 2024 +0000
Allow override of basename of yaml
---
tools/vhosttest.rb | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/vhosttest.rb b/tools/vhosttest.rb
index a8995fb1..ab602664 100755
--- a/tools/vhosttest.rb
+++ b/tools/vhosttest.rb
@@ -10,6 +10,10 @@ require 'whimsy/asf'
# Allow override of local repo
IP = ARGV.shift or raise RuntimeError.new "Need path to infrastructure puppet
checkout"
+# Allow override of yaml name
+base = ARGV.shift || 'whimsy-vm*'
+yaml = Dir["#{IP}/data/nodes/#{base}.apache.org.yaml"].
+ max_by {|path| path[/-vm(\d+)/, 1].to_i}
# Create dummy version of function to allow import
module Puppet
@@ -23,8 +27,6 @@ end
require 'yaml'
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 = 'ldap-us.apache.org:636' # No longer defined in whimsy