knife-zero 0.1.1 → 0.1.2

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: 52c93c2a006243fcbd0e0ad73eb140a8336b73d6
4
- data.tar.gz: 718d5d1c551c145af599aaa9a9e0f3a40a6bcdec
3
+ metadata.gz: b722a029242b27e1a09e5c34db80713dc2f3be69
4
+ data.tar.gz: d79010edf67913305e2b37289157eee93ef771c0
5
5
  SHA512:
6
- metadata.gz: d62de79dcd29220aa558f044e3ef10d7f42f95c8d8e6c397df1d571c987eb11310b52da7bc6226d1d366f17b03e5c3358c205ef6999065b49e28d7b6b8849720
7
- data.tar.gz: d942ed977b211e2ee6f33305c1b9cb85e291d465cf50ed16837cf0c8b4e96c076acaa49e3c4c548c5808e6f5890c4d4bacca5aa704d977ac50c9844a178a9017
6
+ metadata.gz: 4bb00bbd3e59e462fc47995c0e1277826c7334051ff8da1b99627d0039f57ad559fcb82804a2aede377c958ab0bd4c1df1e77f5fdb541ac498a201c3f3f7e4dc
7
+ data.tar.gz: e9b5a407ab633c8008ae2919d7c82bab6a22ac55dd537100c0aa1a14745d8fc2f40aea38c64f51c92437405790e1362829564acea39574e9e5a3be10b28dfb89
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## v0.1.1
4
4
 
5
+ - Update: Issue #2 Support sudo for zero chef-client
6
+
7
+ ## v0.1.1
8
+
5
9
  - Bug: Issue #1 NoMethodError: undefined method 'split' for nil:NilClass at bootstrap
6
10
 
7
11
  ## v0.1.0 (yanked)
@@ -22,6 +22,11 @@ class Chef
22
22
  :description => "The attribute to use for opening the connection - default depends on the context",
23
23
  :proc => Proc.new { |key| Chef::Config[:knife][:ssh_attribute] = key.strip }
24
24
 
25
+ option :use_sudo,
26
+ :long => "--sudo",
27
+ :description => "execute the chef-client via sudo",
28
+ :boolean => true
29
+
25
30
  def run
26
31
  configure_attribute
27
32
  configure_user
@@ -38,7 +43,8 @@ class Chef
38
43
  end
39
44
 
40
45
  def start_chef_client
41
- client_path = @config[:chef_client_path] || 'chef-client'
46
+ client_path = @config[:use_sudo] ? 'sudo ' : ''
47
+ client_path = @config[:chef_client_path] ? "#{client_path}#{@config[:chef_client_path]}" : "#{client_path}chef-client"
42
48
  s = "#{client_path}"
43
49
  s << ' -l debug' if @config[:verbosity] and @config[:verbosity] >= 2
44
50
  s << " -S http://127.0.0.1:8889"
@@ -1,6 +1,6 @@
1
1
  module Knife
2
2
  module Zero
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  MAJOR, MINOR, TINY = VERSION.split('.')
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - sawanoboly