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 7e59dcb add scaffolding useful for testing puppet vhost macros
7e59dcb is described below
commit 7e59dcb2337fdf0eaff91c877d6904dc0397c1c9
Author: Sam Ruby <[email protected]>
AuthorDate: Thu Aug 3 12:21:33 2017 -0400
add scaffolding useful for testing puppet vhost macros
---
tools/vhosttest.rb | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/tools/vhosttest.rb b/tools/vhosttest.rb
new file mode 100644
index 0000000..937d917
--- /dev/null
+++ b/tools/vhosttest.rb
@@ -0,0 +1,27 @@
+#
+# Scaffolding needed to test infrastructure-puppet/modules/vhosts_whimsy/...
+# preprocess_vhosts.rb puppet macro
+#
+
+require 'whimsy/asf'
+
+IP = ASF::Git['infrastructure-puppet']
+
+module Puppet
+ module Parser
+ module Functions
+ def self.newfunction(*args)
+ end
+ end
+ end
+end
+
+require 'yaml'
+require
"#{IP}/modules/vhosts_whimsy/lib/puppet/parser/functions/preprocess_vhosts.rb"
+
+facts = YAML.load_file("#{IP}//data/nodes/whimsy-vm3.apache.org.yaml")
+facts = facts['vhosts_whimsy::vhosts::vhosts']['whimsy-vm-443']
+ldap = ASF::LDAP.hosts.sort.first
+
+macros = Puppet::Parser::Functions::ApacheVHostMacros.new(facts, ldap)
+puts macros.result['custom_fragment']
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].