whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: prep for whimsy-vm5, 6, ...
Date Thu, 05 Oct 2017 19:36:14 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys 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 c8f8086  prep for whimsy-vm5, 6, ...
c8f8086 is described below

commit c8f808634543f688bd717564ea6f032c43561bcd
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Thu Oct 5 15:35:37 2017 -0400

    prep for whimsy-vm5, 6, ...
---
 tools/mkconf.rb    | 2 +-
 tools/vhosttest.rb | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/mkconf.rb b/tools/mkconf.rb
index b679ef7..2be9e74 100644
--- a/tools/mkconf.rb
+++ b/tools/mkconf.rb
@@ -8,7 +8,7 @@
 require 'rbconfig'
 
 if STDIN.tty?
-  conf = `ssh whimsy-vm4.apache.org cat \
+  conf = `ssh whimsy.apache.org cat \
     /etc/apache2/sites-enabled/*-whimsy-vm-443.conf`
 else
   conf = STDIN.read
diff --git a/tools/vhosttest.rb b/tools/vhosttest.rb
index a45f16a..d43cd11 100644
--- a/tools/vhosttest.rb
+++ b/tools/vhosttest.rb
@@ -20,8 +20,9 @@ end
 require 'yaml'
 require "#{IP}/modules/vhosts_whimsy/lib/puppet/parser/functions/preprocess_vhosts.rb"
 
-facts = YAML.load_file("#{IP}/data/nodes/whimsy-vm4.apache.org.yaml")
-facts = facts['vhosts_whimsy::vhosts::vhosts']['whimsy-vm-443']
+yaml = Dir["#{IP}/data/nodes/whimsy-vm*.apache.org.yaml"].
+  sort_by {|path| path[/-vm(\d+)/, 1].to_i}.last
+facts = YAML.load_file(yaml)['vhosts_whimsy::vhosts::vhosts']['whimsy-vm-443']
 ldap = ASF::LDAP.hosts.sort.first
 
 macros = Puppet::Parser::Functions::ApacheVHostMacros.new(facts, ldap)

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message