summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorDavid Schmitt <david@dasz.at>2016-02-16 16:01:25 +0000
committerDavid Schmitt <david@dasz.at>2016-02-16 16:34:03 +0000
commit4e0338bbd79d5e46ccdf330a0520a75728dba503 (patch)
treeb72f80894e5f68df64c73e392daa964e3903a956 /Rakefile
parent818734c0264ffbca9dacc59d358399d819e89ed8 (diff)
downloadpuppet-vcsrepo-4e0338bbd79d5e46ccdf330a0520a75728dba503.tar.gz
puppet-vcsrepo-4e0338bbd79d5e46ccdf330a0520a75728dba503.tar.bz2
(FM-4046) Update to current msync configs [006831f]
This moves all copyright statements to the NOTICE file in accordance with the ASFs guidelines on applying the Apache-2.0 license.
Diffstat (limited to 'Rakefile')
-rwxr-xr-xRakefile31
1 files changed, 31 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index 35ce311..7e9a13d 100755
--- a/Rakefile
+++ b/Rakefile
@@ -9,3 +9,34 @@ PuppetLint.configuration.send('disable_class_inherits_from_params_class')
PuppetLint.configuration.send('disable_documentation')
PuppetLint.configuration.send('disable_single_quote_string_with_variables')
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
+
+desc 'Generate pooler nodesets'
+task :gen_nodeset do
+ require 'beaker-hostgenerator'
+ require 'securerandom'
+ require 'fileutils'
+
+ agent_target = ENV['TEST_TARGET']
+ if ! agent_target
+ STDERR.puts 'TEST_TARGET environment variable is not set'
+ STDERR.puts 'setting to default value of "redhat-64default."'
+ agent_target = 'redhat-64default.'
+ end
+
+ master_target = ENV['MASTER_TEST_TARGET']
+ if ! master_target
+ STDERR.puts 'MASTER_TEST_TARGET environment variable is not set'
+ STDERR.puts 'setting to default value of "redhat7-64mdcl"'
+ master_target = 'redhat7-64mdcl'
+ end
+
+ targets = "#{master_target}-#{agent_target}"
+ cli = BeakerHostGenerator::CLI.new([targets])
+ nodeset_dir = "tmp/nodesets"
+ nodeset = "#{nodeset_dir}/#{targets}-#{SecureRandom.uuid}.yaml"
+ FileUtils.mkdir_p(nodeset_dir)
+ File.open(nodeset, 'w') do |fh|
+ fh.print(cli.execute)
+ end
+ puts nodeset
+end