vagrant-bolt 0.2.1 → 0.3.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/.travis.yml +2 -2
- data/CHANGELOG.md +8 -0
- data/Gemfile +4 -3
- data/README.md +4 -0
- data/lib/vagrant-bolt/config/bolt.rb +1 -14
- data/lib/vagrant-bolt/config/global.rb +14 -0
- data/lib/vagrant-bolt/config_builder/config.rb +10 -0
- data/lib/vagrant-bolt/config_builder/provisioner.rb +8 -0
- data/lib/vagrant-bolt/util/bolt.rb +2 -1
- data/lib/vagrant-bolt/version.rb +1 -1
- data/spec/unit/config/bolt_spec.rb +2 -0
- data/spec/unit/util/bolt_spec.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5db77647479d994addb8c0d44266d5408001a0035f7d57d913107f88c1290a07
|
4
|
+
data.tar.gz: 5ede9d54e55e4401133fa1ede70d62bf7e9ab6aef4805a9533bc0b106cea7cee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90a889e58965672e19a4b4fdd5e667fe05ace1d96d401481e9c73cfba89cc26e284c557a530902b38b97a8bb1cb68f45e163ffd2ecc3094380c309fe4d38920b
|
7
|
+
data.tar.gz: d25d14d296e07fcf22d8a75612e37525495a4e33d2b2f031b804e9d1ac2e28ab0e82c2bd0352329d4a6cc421a7e22be505d842b0e90d3d804cd207f0659a3d8d
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v0.3.0](https://github.com/oscar-stack/vagrant-bolt/tree/v0.3.0) (2020-06-02)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/oscar-stack/vagrant-bolt/compare/v0.2.1...v0.3.0)
|
6
|
+
|
7
|
+
**Merged pull requests:**
|
8
|
+
|
9
|
+
- Update inventory naming [\#16](https://github.com/oscar-stack/vagrant-bolt/pull/16) ([jarretlavallee](https://github.com/jarretlavallee))
|
10
|
+
|
3
11
|
## [v0.2.1](https://github.com/oscar-stack/vagrant-bolt/tree/v0.2.1) (2020-03-23)
|
4
12
|
|
5
13
|
[Full Changelog](https://github.com/oscar-stack/vagrant-bolt/compare/v0.2.0...v0.2.1)
|
data/Gemfile
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
require 'rubygems/version'
|
5
5
|
|
6
|
-
vagrant_branch = ENV['TEST_VAGRANT_VERSION'] || 'v2.2.
|
6
|
+
vagrant_branch = ENV['TEST_VAGRANT_VERSION'] || 'v2.2.9'
|
7
7
|
|
8
8
|
group :plugins do
|
9
9
|
gemspec
|
@@ -27,11 +27,12 @@ group :test do
|
|
27
27
|
tag: vagrant_branch
|
28
28
|
end
|
29
29
|
|
30
|
-
gem 'vagrant-spec', git: 'https://github.com/hashicorp/vagrant-spec.git'
|
30
|
+
gem 'vagrant-spec', git: 'https://github.com/hashicorp/vagrant-spec.git',
|
31
|
+
branch: 'master'
|
31
32
|
end
|
32
33
|
|
33
34
|
group :system_tests do
|
34
|
-
gem 'bolt', "~>
|
35
|
+
gem 'bolt', "~> 2.0.0"
|
35
36
|
end
|
36
37
|
|
37
38
|
|
data/README.md
CHANGED
@@ -260,6 +260,10 @@ The settings available in the triggers and the provisioner are the same.
|
|
260
260
|
* Description: A boolean which controls if the connection should use SSL on with WinRM (Windows)
|
261
261
|
* `ssl_verify`
|
262
262
|
* Description: A boolean which controls if the connection should verify SSL on with WinRM (Windows)
|
263
|
+
* `machine_alias`
|
264
|
+
* Description: A string to use as the machine's alias in the bolt inventory file. Defaults to nil unless `machine_name` is configured in which case it defaults to the machine name.
|
265
|
+
* `machine_name`
|
266
|
+
* Description: A string to use as the machine's name in the bolt inventory file. Defaults to the machine name.
|
263
267
|
* `modulepath`
|
264
268
|
* Description: A string containing the path to bolt modules
|
265
269
|
* `tmpdir`
|
@@ -68,20 +68,7 @@ class VagrantBolt::Config::Bolt < VagrantBolt::Config::Global
|
|
68
68
|
def finalize!
|
69
69
|
@bolt_exe = nil if @bolt_exe == UNSET_VALUE
|
70
70
|
@boltdir = nil if @boltdir == UNSET_VALUE
|
71
|
-
|
72
|
-
@modulepath = nil if @modulepath == UNSET_VALUE
|
73
|
-
@port = nil if @port == UNSET_VALUE
|
74
|
-
@password = nil if @password == UNSET_VALUE
|
75
|
-
@private_key = nil if @private_key == UNSET_VALUE
|
76
|
-
@run_as = nil if @run_as == UNSET_VALUE
|
77
|
-
@ssl = nil if @ssl == UNSET_VALUE
|
78
|
-
@ssl_verify = nil if @ssl_verify == UNSET_VALUE
|
79
|
-
@sudo_password = nil if @sudo_password == UNSET_VALUE
|
80
|
-
@tmpdir = nil if @tmpdir == UNSET_VALUE
|
81
|
-
@user = nil if @user == UNSET_VALUE
|
82
|
-
@verbose = nil if @verbose == UNSET_VALUE
|
83
|
-
@debug = nil if @debug == UNSET_VALUE
|
84
|
-
|
71
|
+
super
|
85
72
|
@args = nil if @args == UNSET_VALUE
|
86
73
|
@name = nil if @name == UNSET_VALUE
|
87
74
|
@node_list = nil if @node_list == UNSET_VALUE
|
@@ -17,6 +17,14 @@ class VagrantBolt::Config::Global < Vagrant.plugin('2', :config)
|
|
17
17
|
# @return [Boolean] If the connection should check the host key on the remote host (linux)
|
18
18
|
attr_accessor :host_key_check
|
19
19
|
|
20
|
+
# @!attribute [rw] machine_alias
|
21
|
+
# @return [String] The alias of the machine to set in the bolt inventory
|
22
|
+
attr_accessor :machine_alias
|
23
|
+
|
24
|
+
# @!attribute [rw] machine_name
|
25
|
+
# @return [String] The name of the machine to set in the bolt inventory
|
26
|
+
attr_accessor :machine_name
|
27
|
+
|
20
28
|
# @!attribute [rw] modulepath
|
21
29
|
# @return [String] The path to the modules.
|
22
30
|
attr_accessor :modulepath
|
@@ -82,6 +90,8 @@ class VagrantBolt::Config::Global < Vagrant.plugin('2', :config)
|
|
82
90
|
@boltdir = UNSET_VALUE
|
83
91
|
@connect_timeout = UNSET_VALUE
|
84
92
|
@host_key_check = UNSET_VALUE
|
93
|
+
@machine_alias = UNSET_VALUE
|
94
|
+
@machine_name = UNSET_VALUE
|
85
95
|
@modulepath = UNSET_VALUE
|
86
96
|
@password = UNSET_VALUE
|
87
97
|
@port = UNSET_VALUE
|
@@ -104,6 +114,8 @@ class VagrantBolt::Config::Global < Vagrant.plugin('2', :config)
|
|
104
114
|
@boltdir = '.' if @boltdir == UNSET_VALUE
|
105
115
|
@connect_timeout = nil if @connect_timeout == UNSET_VALUE
|
106
116
|
@host_key_check = nil if @host_key_check == UNSET_VALUE
|
117
|
+
@machine_alias = nil if @machine_alias == UNSET_VALUE
|
118
|
+
@machine_name = nil if @machine_name == UNSET_VALUE
|
107
119
|
@modulepath = nil if @modulepath == UNSET_VALUE
|
108
120
|
@port = nil if @port == UNSET_VALUE
|
109
121
|
@password = nil if @password == UNSET_VALUE
|
@@ -146,6 +158,8 @@ class VagrantBolt::Config::Global < Vagrant.plugin('2', :config)
|
|
146
158
|
|
147
159
|
if group_objects.include?(key)
|
148
160
|
config[key] = value
|
161
|
+
elsif %r{machine_\w+}.match?(key)
|
162
|
+
config[key.sub('machine_', '')] = value
|
149
163
|
else
|
150
164
|
setting_map.each do |transport, settings|
|
151
165
|
next unless settings.include?(key)
|
@@ -28,6 +28,14 @@ class VagrantBolt::ConfigBuilder::Config < ConfigBuilder::Model::Base
|
|
28
28
|
# @return [Boolean] If the connection should check the host key on the remote host (linux)
|
29
29
|
def_model_attribute :host_key_check
|
30
30
|
|
31
|
+
# @!attribute [rw] machine_alias
|
32
|
+
# @return [String] The alias of the machine to set in the bolt inventory
|
33
|
+
def_model_attribute :machine_alias
|
34
|
+
|
35
|
+
# @!attribute [rw] machine_name
|
36
|
+
# @return [String] The name of the machine to set in the bolt inventory
|
37
|
+
def_model_attribute :machine_name
|
38
|
+
|
31
39
|
# @!attribute [rw] modulepath
|
32
40
|
# @return [String] The path to the modules.
|
33
41
|
def_model_attribute :modulepath
|
@@ -142,6 +150,8 @@ class VagrantBolt::ConfigBuilder::Config < ConfigBuilder::Model::Base
|
|
142
150
|
with_attr(:debug) { |val| bolt.debug = val }
|
143
151
|
with_attr(:connect_timeout) { |val| bolt.connect_timeout = val }
|
144
152
|
with_attr(:host_key_check) { |val| bolt.host_key_check = val }
|
153
|
+
with_attr(:machine_alias) { |val| bolt.machine_alias = val }
|
154
|
+
with_attr(:machine_name) { |val| bolt.machine_name = val }
|
145
155
|
with_attr(:modulepath) { |val| bolt.modulepath = val }
|
146
156
|
with_attr(:name) { |val| bolt.name = val }
|
147
157
|
with_attr(:nodes) { |val| bolt.nodes = val }
|
@@ -28,6 +28,14 @@ class VagrantBolt::ConfigBuilder::Provisioner < ConfigBuilder::Model::Provisione
|
|
28
28
|
# @return [Boolean] If the connection should check the host key on the remote host (linux)
|
29
29
|
def_model_attribute :host_key_check
|
30
30
|
|
31
|
+
# @!attribute [rw] machine_alias
|
32
|
+
# @return [String] The alias of the machine to set in the bolt inventory
|
33
|
+
def_model_attribute :machine_alias
|
34
|
+
|
35
|
+
# @!attribute [rw] machine_name
|
36
|
+
# @return [String] The name of the machine to set in the bolt inventory
|
37
|
+
def_model_attribute :machine_name
|
38
|
+
|
31
39
|
# @!attribute [rw] modulepath
|
32
40
|
# @return [String] The path to the modules.
|
33
41
|
def_model_attribute :modulepath
|
@@ -64,7 +64,6 @@ module VagrantBolt::Util
|
|
64
64
|
ssh_info = machine.ssh_info
|
65
65
|
return node_hash if ssh_info.nil?
|
66
66
|
|
67
|
-
node_hash['alias'] = machine.name.to_s
|
68
67
|
machine_config = machine.config.bolt.inventory_config
|
69
68
|
node_hash['config'] = {}
|
70
69
|
transport = VagrantBolt::Util::Machine.windows?(machine) ? 'winrm' : 'ssh'
|
@@ -76,6 +75,8 @@ module VagrantBolt::Util
|
|
76
75
|
|
77
76
|
node_hash[key] = value
|
78
77
|
end
|
78
|
+
node_hash['name'] ||= machine.name.to_s
|
79
|
+
node_hash['alias'] = machine.name.to_s if node_hash['alias'].nil? && node_hash['name'] != machine.name.to_s
|
79
80
|
node_hash.compact
|
80
81
|
end
|
81
82
|
|
data/lib/vagrant-bolt/version.rb
CHANGED
data/spec/unit/util/bolt_spec.rb
CHANGED
@@ -26,7 +26,6 @@ describe VagrantBolt::Util::Bolt do
|
|
26
26
|
end
|
27
27
|
let(:machine_hash) do
|
28
28
|
{
|
29
|
-
"alias" => "machine",
|
30
29
|
"config" => {
|
31
30
|
"ssh" => {
|
32
31
|
"connect-timeout" => "30",
|
@@ -41,6 +40,8 @@ describe VagrantBolt::Util::Bolt do
|
|
41
40
|
},
|
42
41
|
"uri" => "ssh://machine:22",
|
43
42
|
"facts" => { 'a' => 'b' },
|
43
|
+
"alias" => 'machine',
|
44
|
+
"name" => 'somename',
|
44
45
|
"vars" => { 'foo' => 'bar' },
|
45
46
|
"features" => ['foo'],
|
46
47
|
}
|
@@ -64,6 +65,7 @@ describe VagrantBolt::Util::Bolt do
|
|
64
65
|
config.facts = { 'a' => 'b' }
|
65
66
|
config.features = ['foo']
|
66
67
|
config.vars = { 'foo' => 'bar' }
|
68
|
+
config.machine_name = 'somename'
|
67
69
|
config.finalize!
|
68
70
|
allow(machine).to receive_message_chain("config.bolt.inventory_config").and_return(config.inventory_config)
|
69
71
|
allow(machine).to receive_message_chain("config.vm.communicator").and_return(:ssh)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-bolt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jarret Lavallee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: " Vagrant provisioning with Puppet Bolt\n"
|
14
14
|
email:
|