diff options
author | Micah <micah@leap.se> | 2016-07-12 16:46:26 -0400 |
---|---|---|
committer | Micah <micah@leap.se> | 2016-07-12 16:46:26 -0400 |
commit | 850a14b59444737f703686d0d1996bf09ab08e2b (patch) | |
tree | 6d67b59126fc9d8329b6acdd072b53b5ea35bc25 /puppet/modules/vcsrepo/Rakefile | |
parent | 5247b7ccf5b5889ee16262dd976b03047e34e32c (diff) |
git subrepo clone https://leap.se/git/puppet_vcsrepo puppet/modules/vcsrepo
subrepo:
subdir: "puppet/modules/vcsrepo"
merged: "4e23209"
upstream:
origin: "https://leap.se/git/puppet_vcsrepo"
branch: "master"
commit: "4e23209"
git-subrepo:
version: "0.3.0"
origin: "https://github.com/ingydotnet/git-subrepo"
commit: "1e79595"
Change-Id: I72f8ecdef4855ef9da6e1486453b1cdf01bb54a3
Diffstat (limited to 'puppet/modules/vcsrepo/Rakefile')
-rwxr-xr-x | puppet/modules/vcsrepo/Rakefile | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/puppet/modules/vcsrepo/Rakefile b/puppet/modules/vcsrepo/Rakefile new file mode 100755 index 00000000..7e9a13d5 --- /dev/null +++ b/puppet/modules/vcsrepo/Rakefile @@ -0,0 +1,42 @@ +require 'puppet_blacksmith/rake_tasks' +require 'puppet-lint/tasks/puppet-lint' +require 'puppetlabs_spec_helper/rake_tasks' + +PuppetLint.configuration.fail_on_warnings = true +PuppetLint.configuration.send('relative') +PuppetLint.configuration.send('disable_80chars') +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 |