1 require 'puppet_blacksmith/rake_tasks'
2 require 'puppet-lint/tasks/puppet-lint'
3 require 'puppetlabs_spec_helper/rake_tasks'
5 PuppetLint.configuration.fail_on_warnings = true
6 PuppetLint.configuration.send('relative')
7 PuppetLint.configuration.send('disable_140chars')
8 PuppetLint.configuration.send('disable_class_inherits_from_params_class')
9 PuppetLint.configuration.send('disable_documentation')
10 PuppetLint.configuration.send('disable_single_quote_string_with_variables')
11 PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp", "bundle/**/*", "vendor/**/*"]
13 desc 'Generate pooler nodesets'
15 require 'beaker-hostgenerator'
16 require 'securerandom'
19 agent_target = ENV['TEST_TARGET']
21 STDERR.puts 'TEST_TARGET environment variable is not set'
22 STDERR.puts 'setting to default value of "redhat-64default."'
23 agent_target = 'redhat-64default.'
26 master_target = ENV['MASTER_TEST_TARGET']
28 STDERR.puts 'MASTER_TEST_TARGET environment variable is not set'
29 STDERR.puts 'setting to default value of "redhat7-64mdcl"'
30 master_target = 'redhat7-64mdcl'
33 targets = "#{master_target}-#{agent_target}"
34 cli = BeakerHostGenerator::CLI.new([targets])
35 nodeset_dir = "tmp/nodesets"
36 nodeset = "#{nodeset_dir}/#{targets}-#{SecureRandom.uuid}.yaml"
37 FileUtils.mkdir_p(nodeset_dir)
38 File.open(nodeset, 'w') do |fh|