vagrant-bolt 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/spec.yml +71 -0
- data/.rubocop.yml +3 -0
- data/CHANGELOG.md +19 -0
- data/Gemfile +3 -3
- data/README.md +6 -2
- data/acceptance/components/bolt_spec.rb +16 -17
- data/acceptance/skeletons/advanced/Vagrantfile +1 -1
- data/acceptance/skeletons/base/Puppetfile +2 -0
- data/acceptance/skeletons/base/Vagrantfile +1 -1
- data/acceptance/skeletons/provisioner/Vagrantfile +1 -1
- data/acceptance/skeletons/trigger/Vagrantfile +1 -1
- data/acceptance/vagrant-spec.config.rb +3 -3
- data/lib/vagrant-bolt/command.rb +6 -6
- data/lib/vagrant-bolt/config/bolt.rb +2 -0
- data/lib/vagrant-bolt/config/global.rb +9 -5
- data/lib/vagrant-bolt/config_builder/config.rb +6 -1
- data/lib/vagrant-bolt/config_builder/monkey_patches.rb +1 -0
- data/lib/vagrant-bolt/config_builder/provisioner.rb +5 -1
- data/lib/vagrant-bolt/runner.rb +2 -2
- data/lib/vagrant-bolt/util/bolt.rb +1 -1
- data/lib/vagrant-bolt/util/config.rb +3 -2
- data/lib/vagrant-bolt/util/machine.rb +3 -2
- data/lib/vagrant-bolt/version.rb +1 -1
- data/spec/unit/config/bolt_spec.rb +4 -1
- data/spec/unit/config/global_spec.rb +4 -2
- data/spec/unit/runner/runner_spec.rb +11 -1
- data/spec/unit/util/bolt_spec.rb +18 -2
- metadata +8 -25
- data/.travis.yml +0 -28
- data/acceptance/skeletons/base/modules/facts/CHANGELOG.md +0 -26
- data/acceptance/skeletons/base/modules/facts/CONTRIBUTING.md +0 -279
- data/acceptance/skeletons/base/modules/facts/Gemfile +0 -98
- data/acceptance/skeletons/base/modules/facts/LICENSE +0 -201
- data/acceptance/skeletons/base/modules/facts/README.md +0 -45
- data/acceptance/skeletons/base/modules/facts/Rakefile +0 -8
- data/acceptance/skeletons/base/modules/facts/checksums.json +0 -42
- data/acceptance/skeletons/base/modules/facts/lib/puppet/functions/facts/group_by.rb +0 -14
- data/acceptance/skeletons/base/modules/facts/metadata.json +0 -62
- data/acceptance/skeletons/base/modules/facts/plans/info.pp +0 -16
- data/acceptance/skeletons/base/modules/facts/plans/init.pp +0 -13
- data/acceptance/skeletons/base/modules/facts/tasks/bash.json +0 -5
- data/acceptance/skeletons/base/modules/facts/tasks/bash.sh +0 -93
- data/acceptance/skeletons/base/modules/facts/tasks/init.json +0 -10
- data/acceptance/skeletons/base/modules/facts/tasks/powershell.json +0 -4
- data/acceptance/skeletons/base/modules/facts/tasks/powershell.ps1 +0 -56
- data/acceptance/skeletons/base/modules/facts/tasks/ruby.json +0 -4
- data/acceptance/skeletons/base/modules/facts/tasks/ruby.rb +0 -40
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5315c29b84aa2be5b9d66ef518e07d5eebae92b357becebd7697ee2f4905dee
|
4
|
+
data.tar.gz: 4da2668141db99cac3f88b6fe29b8309a4d55e5661549b9480f6691fe199f859
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9709b7a1074d96f56fab489b309dcce03f141ff5fdaf469761a60ef4fe42820a0f8e4183c071a0bf31a4690ac9c6ce5153383c13ebeab6f7f2332ba0cbc3b9e
|
7
|
+
data.tar.gz: 79248aa3739f5908cab9676c3badb6e1237fd2da799beedbbc1033052abb4468c2b7aa5d7bcb6ca8c079456c8d859ec5587479b96fc011070370ce7ca8a93fc8
|
@@ -0,0 +1,71 @@
|
|
1
|
+
name: Spec and Lint
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
pull_request:
|
8
|
+
branches:
|
9
|
+
- master
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
spec:
|
13
|
+
runs-on: ubuntu-latest
|
14
|
+
strategy:
|
15
|
+
fail-fast: false
|
16
|
+
matrix:
|
17
|
+
include:
|
18
|
+
- vagrant: 'v2.2.1'
|
19
|
+
ruby: 2.5
|
20
|
+
- vagrant: 'v2.2.14'
|
21
|
+
ruby: 2.5
|
22
|
+
- vagrant: 'HEAD'
|
23
|
+
ruby: 2.6
|
24
|
+
- vagrant: 'HEAD'
|
25
|
+
ruby: 2.7
|
26
|
+
steps:
|
27
|
+
- name: Checkout Source
|
28
|
+
uses: actions/checkout@v2
|
29
|
+
|
30
|
+
- name: Setup Ruby ${{ matrix.ruby }}
|
31
|
+
uses: actions/setup-ruby@v1
|
32
|
+
with:
|
33
|
+
ruby-version: ${{ matrix.ruby }}
|
34
|
+
|
35
|
+
- name: Cache gems
|
36
|
+
uses: actions/cache@v2
|
37
|
+
with:
|
38
|
+
path: vendor/gems
|
39
|
+
key: ${{ runner.os }}-pr-${{ hashFiles('**/Gemfile') }}
|
40
|
+
restore-keys: |
|
41
|
+
${{ runner.os }}-pr-
|
42
|
+
${{ runner.os }}-
|
43
|
+
|
44
|
+
- name: Install gems
|
45
|
+
env:
|
46
|
+
TEST_VAGRANT_VERSION: ${{ matrix.vagrant }}
|
47
|
+
run: |
|
48
|
+
gem install bundler
|
49
|
+
bundle config path vendor/gems
|
50
|
+
bundle config jobs 8
|
51
|
+
bundle config retry 3
|
52
|
+
bundle install
|
53
|
+
bundle clean
|
54
|
+
|
55
|
+
- name: bundler environment
|
56
|
+
env:
|
57
|
+
TEST_VAGRANT_VERSION: ${{ matrix.vagrant }}
|
58
|
+
run: |
|
59
|
+
bundle env
|
60
|
+
|
61
|
+
- name: Rubocop
|
62
|
+
env:
|
63
|
+
TEST_VAGRANT_VERSION: ${{ matrix.vagrant }}
|
64
|
+
run: |
|
65
|
+
bundle exec rake rubocop
|
66
|
+
|
67
|
+
- name: Spec Tests
|
68
|
+
env:
|
69
|
+
TEST_VAGRANT_VERSION: ${{ matrix.vagrant }}
|
70
|
+
run: |
|
71
|
+
bundle exec rake spec
|
data/.rubocop.yml
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
---
|
2
2
|
AllCops:
|
3
|
+
NewCops: disable
|
3
4
|
DisplayCopNames: true
|
4
5
|
TargetRubyVersion: '2.4'
|
5
6
|
Include:
|
@@ -114,3 +115,5 @@ Metrics/BlockLength:
|
|
114
115
|
- "acceptance/**/*.rb"
|
115
116
|
Style/RescueStandardError:
|
116
117
|
EnforcedStyle: implicit
|
118
|
+
Lint/MissingSuper:
|
119
|
+
Enabled: false
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v0.4.0](https://github.com/oscar-stack/vagrant-bolt/tree/v0.4.0) (2020-12-23)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/oscar-stack/vagrant-bolt/compare/v0.3.0...v0.4.0)
|
6
|
+
|
7
|
+
**Merged pull requests:**
|
8
|
+
|
9
|
+
- Remove deprecated Bolt features [\#17](https://github.com/oscar-stack/vagrant-bolt/pull/17) ([jarretlavallee](https://github.com/jarretlavallee))
|
10
|
+
|
11
|
+
**Changes**
|
12
|
+
|
13
|
+
- This release requires bolt 2.16.0+
|
14
|
+
- Several deprecated features have been removed such as the following
|
15
|
+
- `boltdir` has been changed to `project`. The `project` setting defaults to `boltdir` to avoid breaking changes
|
16
|
+
- `run-as` has been removed from the `winrm` settings hash in the inventory file
|
17
|
+
- `version` has been removed from the inventory file
|
18
|
+
- `run-as` has been removed from the command line as it was overridden by the inventory file
|
19
|
+
- Acceptance tests have been fixed to use the gem installation of bolt
|
20
|
+
- Travis-CI tests have been migrated to Github Actions
|
21
|
+
|
3
22
|
## [v0.3.0](https://github.com/oscar-stack/vagrant-bolt/tree/v0.3.0) (2020-06-02)
|
4
23
|
|
5
24
|
[Full Changelog](https://github.com/oscar-stack/vagrant-bolt/compare/v0.2.1...v0.3.0)
|
data/Gemfile
CHANGED
@@ -21,18 +21,18 @@ end
|
|
21
21
|
group :test do
|
22
22
|
if %r{head}i.match?(vagrant_branch)
|
23
23
|
gem 'vagrant', git: 'https://github.com/hashicorp/vagrant.git',
|
24
|
-
branch: '
|
24
|
+
branch: 'main'
|
25
25
|
else
|
26
26
|
gem 'vagrant', git: 'https://github.com/hashicorp/vagrant.git',
|
27
27
|
tag: vagrant_branch
|
28
28
|
end
|
29
29
|
|
30
30
|
gem 'vagrant-spec', git: 'https://github.com/hashicorp/vagrant-spec.git',
|
31
|
-
branch: '
|
31
|
+
branch: 'main'
|
32
32
|
end
|
33
33
|
|
34
34
|
group :system_tests do
|
35
|
-
gem 'bolt', "~> 2.
|
35
|
+
gem 'bolt', "~> 2.36.0"
|
36
36
|
end
|
37
37
|
|
38
38
|
|
data/README.md
CHANGED
@@ -218,8 +218,12 @@ The settings available in the triggers and the provisioner are the same.
|
|
218
218
|
* Description: A string containing the full path to the bolt executable
|
219
219
|
* Default: `/opt/puppetlabs/bin/bolt` if it exists, else the first `bolt` in the PATH
|
220
220
|
* `boltdir`
|
221
|
+
* DEPRECATED use `project` instead
|
221
222
|
* Description: A string containing the bolt working directory
|
222
223
|
* Default: The vagrant root
|
224
|
+
* `project`
|
225
|
+
* Description: A string containing the bolt project
|
226
|
+
* Default: The value of `boltdir` for backwards compatibilty
|
223
227
|
* `target_list`
|
224
228
|
* Description: A string containing bolt target list in URI format
|
225
229
|
* This will override `targets` and `excludes`
|
@@ -434,8 +438,8 @@ Requirements
|
|
434
438
|
------------
|
435
439
|
|
436
440
|
* Vagrant 2.2.0+ is required for this plugin.
|
437
|
-
* Bolt
|
438
|
-
* Ruby 2.
|
441
|
+
* Bolt 2.16+ needs to be installed on the platform machine and accessible on the path. Use the `bolt_exe` config parameter if it is not on the path.
|
442
|
+
* Ruby 2.5+
|
439
443
|
|
440
444
|
Known Issues
|
441
445
|
------------
|
@@ -7,6 +7,7 @@ shared_examples 'provider/virtualbox' do |provider, options|
|
|
7
7
|
before do
|
8
8
|
environment.skeleton('base')
|
9
9
|
assert_execute('vagrant', 'box', 'add', 'box', options[:box])
|
10
|
+
execute('bolt', '--project', '.', 'puppetfile', 'install')
|
10
11
|
end
|
11
12
|
|
12
13
|
after do
|
@@ -21,9 +22,9 @@ shared_examples 'provider/virtualbox' do |provider, options|
|
|
21
22
|
|
22
23
|
it 'runs a task, plan, and command' do
|
23
24
|
expect(@result.exit_code).to eq(0)
|
24
|
-
expect(@result.stdout).to match(%r{
|
25
|
-
expect(@result.stdout).to match(%r{
|
26
|
-
expect(@result.stdout).to match(%r{
|
25
|
+
expect(@result.stdout).to match(%r{bolt task run 'facts'})
|
26
|
+
expect(@result.stdout).to match(%r{bolt plan run 'facts'})
|
27
|
+
expect(@result.stdout).to match(%r{bolt command run})
|
27
28
|
expect(@result.stdout.scan(%r{Successful on 1 target}).size).to eq(3)
|
28
29
|
end
|
29
30
|
end
|
@@ -36,9 +37,9 @@ shared_examples 'provider/virtualbox' do |provider, options|
|
|
36
37
|
|
37
38
|
it 'runs a task, plan, and command' do
|
38
39
|
expect(@result.exit_code).to eq(0)
|
39
|
-
expect(@result.stdout).to match(%r{
|
40
|
-
expect(@result.stdout).to match(%r{
|
41
|
-
expect(@result.stdout).to match(%r{
|
40
|
+
expect(@result.stdout).to match(%r{bolt task run 'facts'})
|
41
|
+
expect(@result.stdout).to match(%r{bolt plan run 'facts'})
|
42
|
+
expect(@result.stdout).to match(%r{bolt command run})
|
42
43
|
expect(@result.stdout.scan(%r{Successful on 1 target}).size).to eq(3)
|
43
44
|
end
|
44
45
|
end
|
@@ -52,15 +53,15 @@ shared_examples 'provider/virtualbox' do |provider, options|
|
|
52
53
|
expect(@result.exit_code).to eq(0)
|
53
54
|
result = assert_execute('vagrant', 'bolt', 'task', 'run', 'facts', '-t', 'server')
|
54
55
|
expect(result.exit_code).to eq(0)
|
55
|
-
expect(result.stdout).to match(%r{
|
56
|
+
expect(result.stdout).to match(%r{bolt 'task' 'run' 'facts'})
|
56
57
|
expect(result.stdout.scan(%r{Successful on 1 target}).size).to eq(1)
|
57
58
|
result = assert_execute('vagrant', 'bolt', 'plan', 'run', 'facts', '-t', 'server')
|
58
59
|
expect(result.exit_code).to eq(0)
|
59
|
-
expect(result.stdout).to match(%r{
|
60
|
+
expect(result.stdout).to match(%r{bolt 'plan' 'run' 'facts'})
|
60
61
|
expect(result.stdout.scan(%r{Successful on 1 target}).size).to eq(1)
|
61
62
|
result = assert_execute('vagrant', 'bolt', 'command', 'run', 'hostname', '-t', 'server')
|
62
63
|
expect(result.exit_code).to eq(0)
|
63
|
-
expect(result.stdout).to match(%r{
|
64
|
+
expect(result.stdout).to match(%r{bolt 'command' 'run'})
|
64
65
|
expect(result.stdout.scan(%r{Successful on 1 target}).size).to eq(1)
|
65
66
|
end
|
66
67
|
end
|
@@ -82,17 +83,15 @@ shared_examples 'provider/virtualbox' do |provider, options|
|
|
82
83
|
# Ensure that the trigger is run on both targets
|
83
84
|
expect(result.stdout.scan(%r{server[12]:\s+allnodetest}).size).to eq(4)
|
84
85
|
# Ensure that 'targets = all' includes both targets
|
85
|
-
expect(result.stdout).to match(%r{
|
86
|
-
# Ensure that the root level `run_as` is used
|
87
|
-
expect(result.stdout).to match(%r{
|
86
|
+
expect(result.stdout).to match(%r{bolt command run[^\n]+allnodetest[^\n]+server[12],server[12]})
|
87
|
+
# Ensure that the root level `run_as` is not used
|
88
|
+
expect(result.stdout).to match(%r{bolt command run[^\n]+allnodetest})
|
88
89
|
## Configtest
|
89
90
|
# Ensure excludes overrides targets
|
90
|
-
expect(result.stdout).to match(%r{
|
91
|
+
expect(result.stdout).to match(%r{bolt command run[^\n]+configtest[^\n]+server2})
|
91
92
|
# Ensure verbose and debug flags are correctly handled
|
92
|
-
expect(result.stdout).to match(%r{
|
93
|
-
expect(result.stdout).not_to match(%r{
|
94
|
-
# Ensure run_as override
|
95
|
-
expect(result.stdout).to match(%r{Bolt: Running bolt command locally: \/[^\ ]+bolt command run[^\n]+configtest[^\n]+--run-as 'vagrant'})
|
93
|
+
expect(result.stdout).to match(%r{bolt command run[^\n]+configtest[^\n]+--verbose})
|
94
|
+
expect(result.stdout).not_to match(%r{bolt command run[^\n]+configtest[^\n]+--debug})
|
96
95
|
end
|
97
96
|
end
|
98
97
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'vagrant-spec/which'
|
2
2
|
Vagrant.configure('2') do |config|
|
3
|
-
config.bolt.bolt_exe = Vagrant::Spec::Which.which('bolt')
|
3
|
+
config.bolt.bolt_exe = [Vagrant::Spec::Which.which('ruby'), Vagrant::Spec::Which.which('bolt')]
|
4
4
|
config.bolt.run_as = 'root'
|
5
5
|
config.vm.box = 'box'
|
6
6
|
# Run a trigger on all nodes after provision
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'vagrant-spec/which'
|
2
2
|
Vagrant.configure('2') do |config|
|
3
|
-
config.bolt.bolt_exe = Vagrant::Spec::Which.which('bolt')
|
3
|
+
config.bolt.bolt_exe = [Vagrant::Spec::Which.which('ruby'), Vagrant::Spec::Which.which('bolt')]
|
4
4
|
config.vm.box = 'box'
|
5
5
|
config.vm.define 'server' do |node|
|
6
6
|
node.vm.provision :bolt do |bolt|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'vagrant-spec/which'
|
2
2
|
Vagrant.configure('2') do |config|
|
3
|
-
config.bolt.bolt_exe = Vagrant::Spec::Which.which('bolt')
|
3
|
+
config.bolt.bolt_exe = [Vagrant::Spec::Which.which('ruby'), Vagrant::Spec::Which.which('bolt')]
|
4
4
|
config.vm.box = 'box'
|
5
5
|
config.vm.define 'server' do |node|
|
6
6
|
node.vm.provision :bolt do |bolt|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'vagrant-spec/which'
|
2
2
|
Vagrant.configure('2') do |config|
|
3
|
-
config.bolt.bolt_exe = Vagrant::Spec::Which.which('bolt')
|
3
|
+
config.bolt.bolt_exe = [Vagrant::Spec::Which.which('ruby'), Vagrant::Spec::Which.which('bolt')]
|
4
4
|
config.vm.box = 'box'
|
5
5
|
config.vm.define 'server' do |node|
|
6
6
|
node.trigger.after :up do |trigger|
|
@@ -11,11 +11,11 @@ ENV['VAGRANT_DISABLE_PLUGIN_INIT'] = '1'
|
|
11
11
|
Vagrant::Spec::Acceptance.configure do |c|
|
12
12
|
acceptance_dir = Pathname.new File.expand_path(__dir__)
|
13
13
|
|
14
|
-
c.component_paths = [
|
15
|
-
c.skeleton_paths = [
|
14
|
+
c.component_paths = ["#{acceptance_dir}/components"]
|
15
|
+
c.skeleton_paths = ["#{acceptance_dir}/skeletons"]
|
16
16
|
|
17
17
|
c.provider 'virtualbox',
|
18
|
-
box:
|
18
|
+
box: "#{acceptance_dir}/artifacts/virtualbox.box",
|
19
19
|
env_vars: {
|
20
20
|
'VBOX_USER_HOME' => '{{homedir}}',
|
21
21
|
}
|
data/lib/vagrant-bolt/command.rb
CHANGED
@@ -42,21 +42,21 @@ class VagrantBolt::Command < Vagrant.plugin('2', :command)
|
|
42
42
|
execute_bolt_command(bolt_args)
|
43
43
|
end
|
44
44
|
|
45
|
-
# Run a bolt command with the inventory path, and
|
45
|
+
# Run a bolt command with the inventory path, and project
|
46
46
|
# @param args [Array<String>] An array containing the bolt arguments
|
47
47
|
def execute_bolt_command(args)
|
48
48
|
bolt_exe = @env.vagrantfile.config.bolt.bolt_exe
|
49
|
-
|
49
|
+
project = VagrantBolt::Util::Config.relative_path(@env.vagrantfile.config.bolt.project, @env.root_path)
|
50
50
|
inventoryfile = VagrantBolt::Util::Bolt.inventory_file(@env)
|
51
51
|
|
52
52
|
quoted_args = args.flatten.compact.map { |a| "'#{a}'" }
|
53
53
|
command = [
|
54
|
-
|
54
|
+
bolt_exe,
|
55
55
|
quoted_args,
|
56
|
-
'--
|
57
|
-
|
56
|
+
'--project',
|
57
|
+
project,
|
58
58
|
]
|
59
59
|
command << ['--inventoryfile', "\'#{inventoryfile}\'"] if File.exist?(inventoryfile)
|
60
|
-
VagrantBolt::Util::Machine.run_command(command.flatten.join(
|
60
|
+
VagrantBolt::Util::Machine.run_command(command.flatten.join(' '), @env.ui)
|
61
61
|
end
|
62
62
|
end
|
@@ -6,7 +6,7 @@ class VagrantBolt::Config::Global < Vagrant.plugin('2', :config)
|
|
6
6
|
attr_accessor :bolt_exe
|
7
7
|
|
8
8
|
# @!attribute [rw] boltdir
|
9
|
-
# @return [String] The bolt working directory. Defaults to `.`
|
9
|
+
# @return [String] DEPRECATED use `project`. The bolt working directory. Defaults to `.`
|
10
10
|
attr_accessor :boltdir
|
11
11
|
|
12
12
|
# @!attribute [rw] host_key_check
|
@@ -45,6 +45,10 @@ class VagrantBolt::Config::Global < Vagrant.plugin('2', :config)
|
|
45
45
|
# @return [String] The path of the private_key to authenticate on the machine.
|
46
46
|
attr_accessor :private_key
|
47
47
|
|
48
|
+
# @!attribute [rw] project
|
49
|
+
# @return [String] The bolt project. Defaults to `.`
|
50
|
+
attr_accessor :project
|
51
|
+
|
48
52
|
# @!attribute [rw] run_as
|
49
53
|
# @return [String] User to run as using privilege escalation.
|
50
54
|
attr_accessor :run_as
|
@@ -96,6 +100,7 @@ class VagrantBolt::Config::Global < Vagrant.plugin('2', :config)
|
|
96
100
|
@password = UNSET_VALUE
|
97
101
|
@port = UNSET_VALUE
|
98
102
|
@private_key = UNSET_VALUE
|
103
|
+
@project = UNSET_VALUE
|
99
104
|
@run_as = UNSET_VALUE
|
100
105
|
@ssl = UNSET_VALUE
|
101
106
|
@ssl_verify = UNSET_VALUE
|
@@ -120,6 +125,7 @@ class VagrantBolt::Config::Global < Vagrant.plugin('2', :config)
|
|
120
125
|
@port = nil if @port == UNSET_VALUE
|
121
126
|
@password = nil if @password == UNSET_VALUE
|
122
127
|
@private_key = nil if @private_key == UNSET_VALUE
|
128
|
+
@project = @boltdir if @project == UNSET_VALUE || @project.nil?
|
123
129
|
@run_as = nil if @run_as == UNSET_VALUE
|
124
130
|
@ssl = nil if @ssl == UNSET_VALUE
|
125
131
|
@ssl_verify = nil if @ssl_verify == UNSET_VALUE
|
@@ -136,9 +142,8 @@ class VagrantBolt::Config::Global < Vagrant.plugin('2', :config)
|
|
136
142
|
# Get the full path to the bolt executable
|
137
143
|
# @return [String] The path to the bolt exe
|
138
144
|
def bolt_exe_path
|
139
|
-
|
140
|
-
|
141
|
-
end
|
145
|
+
return '/opt/puppetlabs/bin/bolt' if !Vagrant::Util::Platform.windows? && File.file?('/opt/puppetlabs/bin/bolt')
|
146
|
+
|
142
147
|
Vagrant::Util::Which.which('bolt') || 'bolt'
|
143
148
|
end
|
144
149
|
|
@@ -191,7 +196,6 @@ class VagrantBolt::Config::Global < Vagrant.plugin('2', :config)
|
|
191
196
|
'winrm': [
|
192
197
|
'user',
|
193
198
|
'password',
|
194
|
-
'run_as',
|
195
199
|
'ssl',
|
196
200
|
'ssl_verify',
|
197
201
|
'port',
|
@@ -13,7 +13,7 @@ class VagrantBolt::ConfigBuilder::Config < ConfigBuilder::Model::Base
|
|
13
13
|
def_model_attribute :bolt_exe
|
14
14
|
|
15
15
|
# @!attribute [rw] boltdir
|
16
|
-
# @return [String] The bolt working directory. Defaults to `.`
|
16
|
+
# @return [String] DEPRECATED use `project`. The bolt working directory. Defaults to `.`
|
17
17
|
def_model_attribute :boltdir
|
18
18
|
|
19
19
|
# @!attribute [rw] debug
|
@@ -72,6 +72,10 @@ class VagrantBolt::ConfigBuilder::Config < ConfigBuilder::Model::Base
|
|
72
72
|
# @return [Hash] The paramater hash for the task or plan
|
73
73
|
def_model_attribute :params
|
74
74
|
|
75
|
+
# @!attribute [rw] project
|
76
|
+
# @return [String] The bolt working directory. Defaults to `.`
|
77
|
+
def_model_attribute :project
|
78
|
+
|
75
79
|
# @!attribute [rw] command
|
76
80
|
# @return [Symbol] Whether bolt should use a task or plan
|
77
81
|
def_model_attribute :command
|
@@ -163,6 +167,7 @@ class VagrantBolt::ConfigBuilder::Config < ConfigBuilder::Model::Base
|
|
163
167
|
with_attr(:password) { |val| bolt.password = val }
|
164
168
|
with_attr(:port) { |val| bolt.port = val }
|
165
169
|
with_attr(:private_key) { |val| bolt.private_key = val }
|
170
|
+
with_attr(:project) { |val| bolt.project = val }
|
166
171
|
with_attr(:run_as) { |val| bolt.run_as = val }
|
167
172
|
with_attr(:sudo_password) { |val| bolt.sudo_password = val }
|
168
173
|
with_attr(:ssl) { |val| bolt.ssl = val }
|
@@ -30,6 +30,7 @@ module VagrantBolt::ConfigBuilder::MonkeyPatches
|
|
30
30
|
def eval_bolt_triggers_root(vm_root_config)
|
31
31
|
# Configure the vm bolt object if the options exist
|
32
32
|
triggers = attr(:bolt_triggers) || []
|
33
|
+
|
33
34
|
triggers.each do |config|
|
34
35
|
f = VagrantBolt::ConfigBuilder::Triggers.new_from_hash(config)
|
35
36
|
f.call(vm_root_config)
|
@@ -13,7 +13,7 @@ class VagrantBolt::ConfigBuilder::Provisioner < ConfigBuilder::Model::Provisione
|
|
13
13
|
def_model_attribute :bolt_exe
|
14
14
|
|
15
15
|
# @!attribute [rw] boltdir
|
16
|
-
# @return [String] The bolt working directory. Defaults to `.`
|
16
|
+
# @return [String] DEPRECATED use `project`. The bolt working directory. Defaults to `.`
|
17
17
|
def_model_attribute :boltdir
|
18
18
|
|
19
19
|
# @!attribute [rw] debug
|
@@ -91,6 +91,10 @@ class VagrantBolt::ConfigBuilder::Provisioner < ConfigBuilder::Model::Provisione
|
|
91
91
|
# @return [String] The path of the private_key to authenticate on the machine.
|
92
92
|
def_model_attribute :private_key
|
93
93
|
|
94
|
+
# @!attribute [rw] project
|
95
|
+
# @return [String] The bolt working directory. Defaults to `.`
|
96
|
+
def_model_attribute :project
|
97
|
+
|
94
98
|
# @!attribute [rw] run_as
|
95
99
|
# @return [String] User to run as using privilege escalation.
|
96
100
|
def_model_attribute :run_as
|