vagrant-converge 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0791e9918556cb99c21678dc8d5f08cf0bde128e
4
- data.tar.gz: 824f759ab8c2cfe8fb2c64a96219797ac8b1a47c
3
+ metadata.gz: bb9f21d721269233c90e894ba9912eeffb1199bc
4
+ data.tar.gz: 4b895c95ae6f1bbe3455becf5b411fc194daa87a
5
5
  SHA512:
6
- metadata.gz: 4a54988de6a3be5df4dd7e5ea59484162af4b12fa7c160d897e4ec4f768695d0b206a7579c48efee49fcabbb02d64af440fcf522f4774b8ec307cef25d3eb112
7
- data.tar.gz: e669531fa5d948cd9295b065d4a0bd567eaf13fc2db72e4b5eb9cbe56d112966247ebfb647eecbf7671a66a966ea03e4227ed9ee03fa45650597976a52412e2a
6
+ metadata.gz: acb83c433cd24bfa3fcb8f075593b7cb2e1ff2ce2e3a9959ae6de684931102170e895a512e890aae8a7aa6531503f3738427debe83960e4d559f75dbbf6c9db6
7
+ data.tar.gz: 03448a8084fa8bdfe5063b603ec9ae776ec89083fa10042a36fdae06bea8bd70bd76e27896da1dd63670682e3eef537f85bccddc6a678ef5dffa53af4fedd31a
data/README.md CHANGED
@@ -31,6 +31,7 @@ Update the plugin with:
31
31
  * `rpc_addr` (optional) - Address for server RPC connection. Overrides `local`
32
32
  * `rpc_token` (optional) - Token to use for RPC
33
33
  * `verbose` (optional) - Run the Converge plugin in verbose mode
34
+ * `version` (optional) - Specify the version of Converge. Default is the latest version.
34
35
 
35
36
  ## Example
36
37
 
@@ -38,7 +39,7 @@ Update the plugin with:
38
39
  cfg.params = {
39
40
  "message" = "Not the default message"
40
41
  }
41
- cfg.bikeshed = [
42
+ cfg.hcl = [
42
43
  "https://bintray.com/chrisaubuchon/generic/download_file?file_path=test.hcl"
43
44
  ]
44
45
  cfg.install = true
@@ -0,0 +1,21 @@
1
+ require_relative "../../../errors"
2
+
3
+ module VagrantConverge
4
+ module Cap
5
+ module Guest
6
+ module POSIX
7
+ module ConvergeInstall
8
+ def self.converge_install(machine, version)
9
+ url="https://dl.bintray.com/chrisaubuchon/converge/install.sh"
10
+ command = "curl -sL #{url} | sh -s --"
11
+
12
+ if version != :latest
13
+ command << " -v \"#{version}\""
14
+ end
15
+ machine.communicate.sudo(command)
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -1,12 +1,12 @@
1
1
  module VagrantConverge
2
2
  module Cap
3
3
  module Guest
4
- module Linux
4
+ module POSIX
5
5
  module ConvergeInstalled
6
6
  def self.converge_installed(machine, version)
7
7
  command = 'text -x "$(command -v converge)"'
8
8
 
9
- if !version.empty?
9
+ if version != :latest
10
10
  command << "&& converge version | grep 'converge #{version}'"
11
11
  end
12
12
 
@@ -6,7 +6,6 @@ module VagrantConverge
6
6
  attr_accessor :ca_file
7
7
  attr_accessor :cert_file
8
8
  attr_accessor :install
9
- attr_accessor :install_mode
10
9
  attr_accessor :key_file
11
10
  attr_accessor :local
12
11
  attr_accessor :local_addr
@@ -26,7 +25,6 @@ module VagrantConverge
26
25
  @ca_file = UNSET_VALUE
27
26
  @cert_file = UNSET_VALUE
28
27
  @install = UNSET_VALUE
29
- @install_mode = UNSET_VALUE
30
28
  @key_file = UNSET_VALUE
31
29
  @local = UNSET_VALUE
32
30
  @local_addr = UNSET_VALUE
@@ -45,7 +43,6 @@ module VagrantConverge
45
43
  @ca_file = nil if @ca_file == UNSET_VALUE
46
44
  @cert_file = nil if @cert_file == UNSET_VALUE
47
45
  @install = true if @install == UNSET_VALUE
48
- @install_mode = :default if @install_mode == UNSET_VALUE
49
46
  @key_file = nil if @key_file == UNSET_VALUE
50
47
  @local = true if @local == UNSET_VALUE
51
48
  @local_addr = nil if @local_addr == UNSET_VALUE
@@ -56,7 +53,7 @@ module VagrantConverge
56
53
  @rpc_token = nil if @rpc_token == UNSET_VALUE
57
54
  @use_ssl = false if @use_ssl == UNSET_VALUE
58
55
  @verbose = false if @verbose == UNSET_VALUE
59
- @version = "" if @version == UNSET_VALUE
56
+ @version = :latest if @version == UNSET_VALUE
60
57
 
61
58
  # RPC connection takes precedence over local
62
59
  if @rpc_addr
@@ -19,13 +19,24 @@ module VagrantConverge
19
19
  end
20
20
 
21
21
  guest_capability(:linux, :converge_installed) do
22
- require_relative "cap/guest/linux/converge_installed"
23
- Cap::Guest::Linux::ConvergeInstalled
22
+ require_relative "cap/guest/posix/converge_installed"
23
+ Cap::Guest::POSIX::ConvergeInstalled
24
24
  end
25
25
 
26
26
  guest_capability(:linux, :converge_install) do
27
- require_relative "cap/guest/linux/converge_install"
28
- Cap::Guest::Linux::ConvergeInstall
27
+ require_relative "cap/guest/posix/converge_install"
28
+ Cap::Guest::POSIX::ConvergeInstall
29
+ end
30
+
31
+
32
+ guest_capability(:freebsd, :converge_installed) do
33
+ require_relative "cap/guest/posix/converge_installed"
34
+ Cap::Guest::POSIX::ConvergeInstalled
35
+ end
36
+
37
+ guest_capability(:freebsd, :converge_install) do
38
+ require_relative "cap/guest/posix/converge_install"
39
+ Cap::Guest::POSIX::ConvergeInstall
29
40
  end
30
41
  end
31
42
  end
@@ -25,7 +25,7 @@ module VagrantConverge
25
25
  end
26
26
 
27
27
  if config.install && !machine.guest.capability(:converge_installed, config.version)
28
- @machine.guest.capability(:converge_install, config.install_mode, config.version)
28
+ @machine.guest.capability(:converge_install, config.version)
29
29
  end
30
30
 
31
31
  @machine.communicate.execute(
@@ -1,3 +1,3 @@
1
1
  module VagrantConverge
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-converge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Aubuchon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-19 00:00:00.000000000 Z
11
+ date: 2016-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,8 +52,8 @@ files:
52
52
  - bin/console
53
53
  - bin/setup
54
54
  - lib/vagrant-converge.rb
55
- - lib/vagrant-converge/cap/guest/linux/converge_install.rb
56
- - lib/vagrant-converge/cap/guest/linux/converge_installed.rb
55
+ - lib/vagrant-converge/cap/guest/posix/converge_install.rb
56
+ - lib/vagrant-converge/cap/guest/posix/converge_installed.rb
57
57
  - lib/vagrant-converge/config/guest.rb
58
58
  - lib/vagrant-converge/errors.rb
59
59
  - lib/vagrant-converge/plugin.rb
@@ -1,20 +0,0 @@
1
- require_relative "../../../errors"
2
-
3
- module VagrantConverge
4
- module Cap
5
- module Guest
6
- module Linux
7
- module ConvergeInstall
8
- def self.converge_install(machine, install_mode, version)
9
- if install_mode == :pip
10
- raise Converge::Errors::ConvergePipInstallIsNotSupported
11
- else
12
- machine.communicate.sudo "curl -L -o /usr/bin/converge https://bintray.com/chrisaubuchon/generic/download_file?file_path=converge"
13
- machine.communicate.sudo "chmod 0755 /usr/bin/converge"
14
- end
15
- end
16
- end
17
- end
18
- end
19
- end
20
- end