source: src/puppetcode/environments/test/modules/stdlib/Rakefile@ d9af413

0.5 app-cordova debian/bullseye debian/jessie
Last change on this file since d9af413 was 1c22429, checked in by Joachim Langenbach <joachim.langenbach@…>, 10 years ago
  • gnuboat_epd adds the apt repository from gnuboat to install epd-fuse package
  • Property mode set to 100644
File size: 1.4 KB
Line 
1require 'puppet_blacksmith/rake_tasks'
2require 'puppet-lint/tasks/puppet-lint'
3require 'puppetlabs_spec_helper/rake_tasks'
4
5PuppetLint.configuration.fail_on_warnings = true
6PuppetLint.configuration.send('relative')
7PuppetLint.configuration.send('disable_80chars')
8PuppetLint.configuration.send('disable_class_inherits_from_params_class')
9PuppetLint.configuration.send('disable_documentation')
10PuppetLint.configuration.send('disable_single_quote_string_with_variables')
11PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
12
13desc 'Generate pooler nodesets'
14task :gen_nodeset do
15 require 'beaker-hostgenerator'
16 require 'securerandom'
17 require 'fileutils'
18
19 agent_target = ENV['TEST_TARGET']
20 if ! agent_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.'
24 end
25
26 master_target = ENV['MASTER_TEST_TARGET']
27 if ! master_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'
31 end
32
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|
39 fh.print(cli.execute)
40 end
41 puts nodeset
42end
Note: See TracBrowser for help on using the repository browser.