vagrant-pe_build 0.10.4 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YzllM2JjYzY0MjI1ODMxMGQ0YTg1NGYzOTFkZjNiNTdmN2RhNWU5OA==
5
- data.tar.gz: !binary |-
6
- YmM1YTYyZDMyOWYwZGZiYzQyYWM5NGQ2ZWZiODU5NzcxNzRmYjM3Nw==
2
+ SHA1:
3
+ metadata.gz: 60203f10382b8165bd7ed0cb6719bfa64e26f72d
4
+ data.tar.gz: 523aae2be9317ea18ab6169ba68a098be1f17c65
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- Yzk4NzA3N2NjYzkzZDQ3MjdhOTg4MWU5YWFlYjhkN2EyMDQyZTNlMDk2Mjk3
10
- MGM2YzA3YjVhZTM4Yjc3Y2I4OTNkYWI3NDc4ZGMzNzljNjIwN2QxMmQ1ODY3
11
- OGVkZmRhMTI2MWM2MDI5OWQwYTc1MDFkZDg2Mzk1YjhkM2U1YmY=
12
- data.tar.gz: !binary |-
13
- MjZmZmZlNTdmMzA1ZDg1NzQwZTY0Y2NjM2ZjOWRlNWM1ZjM4NDRkNzVjZDhi
14
- NTJlZmUyYWVhOGMwNDQ4NDQ3NTBhY2NkODA3MWI3NDdlM2MxZWY4YWNjMWE5
15
- ZjY3ZTMzNTdkYWQ0NGIwODRhOTEzZDJjNzc1MzYzYWZlYmRjN2E=
6
+ metadata.gz: 4b695d95bde3f22905e42215aff2b049c258adbfbd0d42fe5c5fa7e2dea13cb18bef4da860dcf165f301b1794c0537ba1587ef5331c0bc32755d5d004bb5d06e
7
+ data.tar.gz: 190db868e4a29c6e438fcdc3d8977f44e49b458a4499942451e8375936850ea6d3c4e6c6eea7c26ef4d8dbae4ddeb72b8463c9ea2647d8bc9a31e1f5f13ee9c8
data/.travis.yml CHANGED
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  language: ruby
3
+ sudo: false
3
4
  before_install:
4
5
  - gem install bundler --version $BUNDLER_VERSION
5
6
  install: bundle _${BUNDLER_VERSION}_ install --without development
@@ -14,5 +15,5 @@ env:
14
15
  matrix:
15
16
  - TEST_VAGRANT_VERSION=v1.5.4 BUNDLER_VERSION=1.5.3
16
17
  - TEST_VAGRANT_VERSION=v1.6.5 BUNDLER_VERSION=1.6.9
17
- - TEST_VAGRANT_VERSION=v1.7.2 BUNDLER_VERSION=1.7.9
18
- - TEST_VAGRANT_VERSION=HEAD BUNDLER_VERSION=1.7.9
18
+ - TEST_VAGRANT_VERSION=v1.7.4 BUNDLER_VERSION=1.10.5
19
+ - TEST_VAGRANT_VERSION=HEAD BUNDLER_VERSION=1.10.5
data/CHANGELOG CHANGED
@@ -1,6 +1,24 @@
1
1
  vagrant-pe_build
2
2
  ================
3
3
 
4
+ 0.11.0
5
+ ------
6
+
7
+ 2015-09-08
8
+
9
+ This is a feature release that also removes one deprecated command.
10
+
11
+ * (GH-66) The `pe_bootstrap` provisioner now has a `answers_extra`
12
+ configuration option. This option can be set to a list of strings which
13
+ will be appended to the answer file, one entry per line.
14
+
15
+ * (GH-44) Vagrant 1.3.0 prevented any plugin from declaring a command that
16
+ uses a `--version` flag. The `vagrant pe-build copy` command now uses a
17
+ flag called `--release` to specify which PE version to download.
18
+
19
+ * (GH-35) The deprecated `vagrant pe-build download` command has been
20
+ removed. Use `vagrant pe-build copy` instead.
21
+
4
22
  0.10.4
5
23
  ------
6
24
 
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
  ruby '2.0.0' # Required by Vagrant 1.4 and newer.
3
3
 
4
- ENV['TEST_VAGRANT_VERSION'] ||= 'v1.7.2'
4
+ ENV['TEST_VAGRANT_VERSION'] ||= 'v1.7.4'
5
5
 
6
6
  # Wrapping gemspec in the :plugins group causes Vagrant 1.5 and newer to
7
7
  # automagically load this plugin during acceptance tests.
data/README.markdown CHANGED
@@ -3,7 +3,7 @@ Vagrant PE build
3
3
 
4
4
  Download and install Puppet Enterprise with Vagrant.
5
5
 
6
- [![Build Status](https://travis-ci.org/adrienthebo/vagrant-pe_build.svg?branch=master)](https://travis-ci.org/adrienthebo/vagrant-pe_build)
6
+ [![Build Status](https://travis-ci.org/oscar-stack/vagrant-pe_build.svg?branch=master)](https://travis-ci.org/oscar-stack/vagrant-pe_build)
7
7
 
8
8
  Synopsis
9
9
  --------
@@ -65,6 +65,11 @@ overridden at this point.
65
65
  Values can be paths relative to the Vagrantfile's project directory.
66
66
  * Default: The default answer file for the Puppet Enterprise version and
67
67
  role.
68
+ * `answer_extras`
69
+ * Description: An array of strings that will be appended to the answer file
70
+ template, one string per line. This can be used to supply additional
71
+ answers and override default answers.
72
+ * Default: An empty array.
68
73
  * `relocate_manifests`
69
74
  * Description: Whether or not to change the PE master to use a config of
70
75
  `manifestdir=/manifests` and `modulepath=/modules`. This is meant to be
@@ -0,0 +1,46 @@
1
+ require 'vagrant-spec/acceptance/output'
2
+
3
+ module Vagrant
4
+ module Spec
5
+ OutputTester[:no_archives] = lambda do |text|
6
+ text =~ /No PE versions available/
7
+ end
8
+
9
+ OutputTester[:pe_available] = lambda do |text|
10
+ text =~ /puppet-enterprise-\d+\.\d\.\d-el-6-x86_64\.tar\.gz/
11
+ end
12
+ end
13
+ end
14
+
15
+
16
+ describe 'vagrant CLI: pe-build', component: 'cli/pe-build' do
17
+ include_context 'acceptance'
18
+
19
+ let(:options) { config.providers.values.first }
20
+
21
+ let(:webserver_port) { 3838 }
22
+ let(:webserver_path) { options[:archive_path] }
23
+ let(:download_url) { "http://localhost:#{webserver_port}" }
24
+
25
+ include_context 'webserver'
26
+
27
+ before(:each) do
28
+ environment.skeleton('pe_build')
29
+ end
30
+
31
+ it 'can download archives from remote servers' do
32
+ result = execute('vagrant', 'pe-build', 'list')
33
+ expect(result).to exit_with(0)
34
+ expect(result.stdout).to match_output(:no_archives)
35
+
36
+ result = execute('vagrant', 'pe-build', 'copy',
37
+ "--release=#{options[:pe_latest]}",
38
+ "#{download_url}/puppet-enterprise-:version-el-6-x86_64.tar.gz")
39
+ expect(result).to exit_with(0)
40
+
41
+ result = execute('vagrant', 'pe-build', 'list')
42
+ expect(result).to exit_with(0)
43
+ expect(result.stdout).to match_output(:pe_available)
44
+ end
45
+
46
+ end
@@ -16,7 +16,7 @@ Vagrant.configure('2') do |config|
16
16
  set_resources node, 4096, 1
17
17
 
18
18
  node.vm.provision :pe_bootstrap do |p|
19
- p.version = '3.8.0'
19
+ p.version = '3.8.2'
20
20
  p.role = :master
21
21
  end
22
22
  end
@@ -6,6 +6,5 @@ module PEBuild
6
6
  require 'pe_build/command/base'
7
7
  require 'pe_build/command/copy'
8
8
  require 'pe_build/command/list'
9
- require 'pe_build/command/download'
10
9
  end
11
10
  end
@@ -2,13 +2,16 @@ require 'vagrant'
2
2
 
3
3
  class PEBuild::Command::Base < Vagrant.plugin(2, :command)
4
4
 
5
+ def self.synopsis
6
+ 'list and download PE installers'
7
+ end
8
+
5
9
  def initialize(argv, env)
6
10
  super
7
11
  split_argv
8
12
 
9
13
  @subcommands = {
10
14
  'list' => PEBuild::Command::List,
11
- 'download' => PEBuild::Command::Download,
12
15
  'copy' => PEBuild::Command::Copy,
13
16
  }
14
17
  end
@@ -39,7 +39,7 @@ class PEBuild::Command::Copy < Vagrant.plugin(2, :command)
39
39
 
40
40
  o.separator ''
41
41
 
42
- o.on('-v', '--version=val', String, "The version of PE to fetch") do |val|
42
+ o.on('-r', '--release=val', String, "The release of PE to fetch") do |val|
43
43
  @options[:version] = val
44
44
  end
45
45
 
@@ -12,6 +12,12 @@ class PEBuild::Config::PEBootstrap < PEBuild::Config::Global
12
12
  # @since 0.1.0
13
13
  attr_accessor :answer_file
14
14
 
15
+ # @!attribute answer_extras
16
+ # @return [Array<String>] An array of additional answer strings that will
17
+ # be appended to the answer file. (Optional)
18
+ # @since 0.11.0
19
+ attr_accessor :answer_extras
20
+
15
21
  # @!attribute verbose
16
22
  # @return [TrueClass, FalseClass] if stdout will be displayed when installing
17
23
  # @since 0.1.0
@@ -53,6 +59,7 @@ class PEBuild::Config::PEBootstrap < PEBuild::Config::Global
53
59
  @verbose = UNSET_VALUE
54
60
  @master = UNSET_VALUE
55
61
  @answer_file = UNSET_VALUE
62
+ @answer_extras = UNSET_VALUE
56
63
 
57
64
  @relocate_manifests = UNSET_VALUE
58
65
 
@@ -71,6 +78,7 @@ class PEBuild::Config::PEBootstrap < PEBuild::Config::Global
71
78
  set_default :@verbose, true
72
79
  set_default :@master, 'master'
73
80
  set_default :@answer_file, nil
81
+ set_default :@answer_extras, []
74
82
  set_default :@autosign, (@role == :master)
75
83
 
76
84
  set_default :@relocate_manifests, false
@@ -94,6 +102,7 @@ class PEBuild::Config::PEBootstrap < PEBuild::Config::Global
94
102
  validate_verbose(errors, machine)
95
103
  validate_master(errors, machine)
96
104
  validate_answer_file(errors, machine)
105
+ validate_answer_extras(errors, machine)
97
106
  validate_relocate_manifests(errors, machine)
98
107
  validate_autosign(errors, machine)
99
108
 
@@ -134,6 +143,15 @@ class PEBuild::Config::PEBootstrap < PEBuild::Config::Global
134
143
  end
135
144
  end
136
145
 
146
+ def validate_answer_extras(errors, machine)
147
+ unless @answer_extras.is_a? Array
148
+ errors << I18n.t(
149
+ 'pebuild.config.pe_bootstrap.errors.invalid_answer_extras',
150
+ :class => @answer_extras.class
151
+ )
152
+ end
153
+ end
154
+
137
155
  def validate_relocate_manifests(errors, machine)
138
156
  if @relocate_manifests and not @role == :master
139
157
  errors << "'relocate_manifests' can only be applied to a master"
@@ -21,6 +21,12 @@ class PEBuild::ConfigBuilder::PEBootstrap < ::PEBuild::ConfigBuilder::Global
21
21
  # directory.
22
22
  def_model_attribute :answer_file
23
23
 
24
+ # @!attribute answer_extras
25
+ # @return [Array<String>] An array of additional answer strings that will
26
+ # be appended to the answer file. (Optional)
27
+ # @since 0.11.0
28
+ def_model_attribute :answer_extras
29
+
24
30
  # @!attribute [rw] relocate_manifests
25
31
  # @return [Boolean] Whether or not to change the PE master to use a config
26
32
  # of manifestdir=/manifests and modulepath=/modules. This is meant to be
@@ -55,6 +61,7 @@ class PEBuild::ConfigBuilder::PEBootstrap < ::PEBuild::ConfigBuilder::Global
55
61
  with_attr(:verbose) { |val| pe.verbose = val }
56
62
  with_attr(:master) { |val| pe.master = val }
57
63
  with_attr(:answer_file) { |val| pe.answer_file = val }
64
+ with_attr(:answer_extras) { |val| pe.answer_extras = val }
58
65
  with_attr(:relocate_manifests) { |val| pe.relocate_manifests = val }
59
66
  with_attr(:autosign) { |val| pe.autosign = val }
60
67
  end
@@ -2,6 +2,12 @@ require 'pe_build/release'
2
2
 
3
3
  require 'erb'
4
4
 
5
+ # A sub-provisioner which generates answer file content.
6
+ #
7
+ # This is an internal provisioner which is invoked by
8
+ # `PEBuild::Provisioner::PEBootstrap`.
9
+ #
10
+ # @api private
5
11
  class PEBuild::Provisioner::PEBootstrap::AnswersFile
6
12
 
7
13
  # @param machine [Vagrant::Machine]
@@ -26,6 +32,15 @@ class PEBuild::Provisioner::PEBootstrap::AnswersFile
26
32
  @output_file.open('w') { |fh| fh.write(render_answers) }
27
33
  end
28
34
 
35
+ def render_answers
36
+ answer_template = template_data
37
+ unless @config.answer_extras.empty?
38
+ answer_template += ("\n" + @config.answer_extras.map {|e| e.to_s}.join("\n") + "\n")
39
+ end
40
+
41
+ ERB.new(answer_template).result(binding)
42
+ end
43
+
29
44
  private
30
45
 
31
46
  def set_template_path
@@ -42,9 +57,9 @@ class PEBuild::Provisioner::PEBootstrap::AnswersFile
42
57
  @logger.info "Using #{mode} answers file template #{@template} for #{@machine.inspect}"
43
58
  end
44
59
 
45
- def render_answers
46
- template_data = File.read(@template)
47
- ERB.new(template_data).result(binding)
60
+ # Separated for easy stubbing in spec tests.
61
+ def template_data
62
+ File.read(@template)
48
63
  end
49
64
 
50
65
  def machine_hostname
@@ -1,6 +1,12 @@
1
1
  require 'pe_build/on_machine'
2
2
  require 'pe_build/util/version_string'
3
3
 
4
+ # A sub-provisioner which applies post-install configuration.
5
+ #
6
+ # This is an internal provisioner which is invoked by
7
+ # `PEBuild::Provisioner::PEBootstrap`.
8
+ #
9
+ # @api private
4
10
  class PEBuild::Provisioner::PEBootstrap::PostInstall
5
11
 
6
12
  def initialize(machine, config, work_dir)
@@ -38,6 +38,6 @@ module PEBuild
38
38
  require 'pe_build/release/3_7'
39
39
  require 'pe_build/release/3_8'
40
40
 
41
- LATEST_VERSION = '3.8.1'
41
+ LATEST_VERSION = '3.8.2'
42
42
  end
43
43
  end
@@ -57,5 +57,6 @@ module PEBuild::Release
57
57
 
58
58
  @releases['3.8.0'] = three_eight_x
59
59
  @releases['3.8.1'] = three_eight_x
60
+ @releases['3.8.2'] = three_eight_x
60
61
  end
61
62
 
@@ -1,3 +1,3 @@
1
1
  module PEBuild
2
- VERSION = '0.10.4'
2
+ VERSION = '0.11.0'
3
3
  end
@@ -15,6 +15,25 @@ describe PEBuild::Config::PEBootstrap do
15
15
  end
16
16
  end
17
17
 
18
+ describe 'answer_extras' do
19
+ it 'defaults to an empty Array' do
20
+ subject.finalize!
21
+
22
+ expect(subject.answer_extras).to be_a(Array)
23
+ end
24
+
25
+ context 'when validated with a non-array value' do
26
+ it 'records an error' do
27
+ subject.answer_extras = {'' => ''}
28
+
29
+ subject.finalize!
30
+ errors = subject.validate(machine)
31
+
32
+ expect(errors['PE Bootstrap'].to_s).to match(/Answer_extras.*got a Hash/)
33
+ end
34
+ end
35
+ end
36
+
18
37
  # TODO: Spec test the validation functions. Not critical right now since it
19
38
  # is pretty much testing tests. But, having specs is a good way for people to
20
39
  # see precisely _what_ is allowed.
@@ -0,0 +1,66 @@
1
+ require 'spec_helper'
2
+
3
+ require 'pe_build/provisioner/pe_bootstrap'
4
+
5
+ describe PEBuild::Provisioner::PEBootstrap::AnswersFile do
6
+ include_context 'vagrant-unit'
7
+
8
+ let(:test_env) do
9
+ test_env = isolated_environment
10
+ test_env.vagrantfile <<-EOF
11
+ Vagrant.configure('2') do |config|
12
+ config.vm.define :test
13
+ end
14
+ EOF
15
+
16
+ test_env
17
+ end
18
+ let(:env) { test_env.create_vagrant_env }
19
+ let(:machine) { env.machine(:test, :dummy) }
20
+ let(:bootstrap_config) { PEBuild::Config::PEBootstrap.new }
21
+
22
+ # Mock the communicator to prevent SSH commands from being executed.
23
+ let(:communicator) { double('communicator') }
24
+ # Mock the guest operating system.
25
+ let(:guest) { double('guest') }
26
+
27
+ before (:each) do
28
+ machine.stub(:guest => guest)
29
+ machine.stub(:communicator => communicator)
30
+ end
31
+
32
+ after(:each) { test_env.close }
33
+
34
+ subject do
35
+ provisioner = described_class.new(machine, bootstrap_config, env.root_path.join(PEBuild::WORK_DIR))
36
+ provisioner.stub(:template_data) { "original template" }
37
+
38
+ provisioner
39
+ end
40
+
41
+
42
+ context 'when answer_extras is not configured' do
43
+ before(:each) do
44
+ bootstrap_config.version = '3.8.2'
45
+
46
+ bootstrap_config.finalize!
47
+ end
48
+
49
+ it 'does not modify the template' do
50
+ expect(subject.render_answers).to eq("original template")
51
+ end
52
+ end
53
+
54
+ context 'when answer_extras is configured' do
55
+ before(:each) do
56
+ bootstrap_config.version = '3.8.2'
57
+ bootstrap_config.answer_extras = ['q_foo=bar', 'q_baz=bim']
58
+
59
+ bootstrap_config.finalize!
60
+ end
61
+
62
+ it 'appends answers to the template' do
63
+ expect(subject.render_answers.lines.last).to eq("q_baz=bim\n")
64
+ end
65
+ end
66
+ end
@@ -58,6 +58,8 @@ en:
58
58
  Autosign can only be specified if the pe_bootstrap role is 'master', not %{role}.
59
59
  invalid_autosign_class: |-
60
60
  Autosign must be one of %{autosign_classes}, but was of type %{autosign}.
61
+ invalid_answer_extras: |-
62
+ Answer_extras must be an Array, got a %{class}.
61
63
  cap:
62
64
  run_install:
63
65
  already_installed: |-
@@ -13,6 +13,7 @@ Vagrant::Spec::Acceptance.configure do |c|
13
13
  box: (acceptance_dir + 'artifacts' + 'virtualbox.box').to_s,
14
14
  # This folder should be filled with PE tarballs for CentOS.
15
15
  archive_path: (acceptance_dir + 'artifacts' + 'pe_archives').to_s,
16
+ pe_latest: '2015.2.0',
16
17
  env_vars: {
17
18
  'VBOX_USER_HOME' => '{{homedir}}',
18
19
  }
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-pe_build
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.4
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrien Thebo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-12 00:00:00.000000000 Z
11
+ date: 2015-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: progressbar
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitar
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
@@ -83,8 +83,8 @@ files:
83
83
  - Rakefile
84
84
  - acceptance/pe_build/pe_bootstrap_3x_spec.rb
85
85
  - acceptance/pe_build/pe_bootstrap_latest_spec.rb
86
+ - acceptance/pe_build/pe_build_cli_spec.rb
86
87
  - acceptance/skeletons/pe_build/Vagrantfile
87
- - acceptance/skeletons/pe_build/agent-3.x.txt.erb
88
88
  - doc/answers/README.markdown
89
89
  - doc/answers/agent.txt
90
90
  - doc/answers/master-1.1.txt
@@ -110,7 +110,6 @@ files:
110
110
  - lib/pe_build/command.rb
111
111
  - lib/pe_build/command/base.rb
112
112
  - lib/pe_build/command/copy.rb
113
- - lib/pe_build/command/download.rb
114
113
  - lib/pe_build/command/list.rb
115
114
  - lib/pe_build/config.rb
116
115
  - lib/pe_build/config/global.rb
@@ -155,7 +154,7 @@ files:
155
154
  - spec/spec_helper.rb
156
155
  - spec/unit/config/global_spec.rb
157
156
  - spec/unit/config/pe_bootstrap_spec.rb
158
- - spec/unit/provisioner/pe_bootstrap_spec.rb
157
+ - spec/unit/provisioner/pe_bootstrap_answers_spec.rb
159
158
  - spec/unit/util/config_spec.rb
160
159
  - tasks/acceptance.rake
161
160
  - tasks/spec.rake
@@ -180,17 +179,17 @@ require_paths:
180
179
  - lib
181
180
  required_ruby_version: !ruby/object:Gem::Requirement
182
181
  requirements:
183
- - - ! '>='
182
+ - - '>='
184
183
  - !ruby/object:Gem::Version
185
184
  version: '0'
186
185
  required_rubygems_version: !ruby/object:Gem::Requirement
187
186
  requirements:
188
- - - ! '>='
187
+ - - '>='
189
188
  - !ruby/object:Gem::Version
190
189
  version: '0'
191
190
  requirements: []
192
191
  rubyforge_project:
193
- rubygems_version: 2.4.8
192
+ rubygems_version: 2.0.14
194
193
  signing_key:
195
194
  specification_version: 4
196
195
  summary: Vagrant provisioner for installing Puppet Enterprise
@@ -1,17 +0,0 @@
1
- q_fail_on_unsuccessful_master_lookup=y
2
- q_install=y
3
- q_puppet_cloud_install=n
4
- q_puppet_enterpriseconsole_install=n
5
- q_puppet_symlinks_install=y
6
- q_puppetagent_certname=<%= machine_hostname %>
7
- q_puppetagent_install=y
8
- q_puppetagent_server=<%= @config.master %>
9
- q_puppetca_install=n
10
- q_puppetdb_hostname=
11
- q_puppetdb_install=n
12
- q_puppetdb_port=
13
- q_puppetmaster_install=n
14
- q_vendor_packages_install=y
15
- q_continue_or_reenter_master_hostname=c
16
- q_verify_packages=y
17
- q_fail_on_unsuccessful_master_lookup=n
@@ -1,10 +0,0 @@
1
- require 'pe_build/archive'
2
- require 'pe_build/command/copy'
3
-
4
- class PEBuild::Command::Download < Vagrant.plugin(2, :command)
5
-
6
- def execute
7
- @env.ui.warn "vagrant pe-build download is deprecated, use vagrant pe-build copy", :prefix => true
8
- PEBuild::Command::Copy.new(@argv, @env).execute
9
- end
10
- end
@@ -1,47 +0,0 @@
1
- require 'spec_helper'
2
-
3
- require 'pe_build/provisioner/pe_bootstrap'
4
-
5
- describe PEBuild::Provisioner::PEBootstrap do
6
- include_context 'vagrant-unit'
7
-
8
- let(:test_env) do
9
- test_env = isolated_environment
10
- test_env.vagrantfile <<-EOF
11
- Vagrant.configure('2') do |config|
12
- config.vm.define :test
13
- end
14
- EOF
15
-
16
- test_env
17
- end
18
- let(:env) { test_env.create_vagrant_env }
19
- let(:machine) { env.machine(:test, :dummy) }
20
- let(:bootstrap_config) { PEBuild::Config::PEBootstrap.new }
21
-
22
- # Mock the communicator to prevent SSH commands for being executed.
23
- let(:communicator) { double('communicator') }
24
- # Mock the guest operating system.
25
- let(:guest) { double('guest') }
26
-
27
- before (:each) do
28
- machine.stub(:guest => guest)
29
- machine.stub(:communicator => communicator)
30
- end
31
-
32
- after(:each) { test_env.close }
33
-
34
- subject(:provisioner) { described_class.new(machine, bootstrap_config) }
35
-
36
-
37
- describe 'when configured' do
38
- context 'and no version is set' do
39
- it 'raises an error' do
40
- pending 'This is now done in the `provision` method which is difficult to isolate for a test'
41
- expect { subject.configure(machine.config) }.to raise_error(
42
- PEBuild::Provisioner::PEBootstrap::UnsetVersionError,
43
- /version must be set/ )
44
- end
45
- end
46
- end
47
- end