knife-zero 1.15.1 → 1.15.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0f27c1dcc062d31c5a6f25fba362697e71267cb7
4
- data.tar.gz: 5f374aff7f7934d31004e3736d35eff495b5b6ca
3
+ metadata.gz: 30765529147d0bfd82148ca0d57b8bc957e98392
4
+ data.tar.gz: 0aa9d5f14811840d8c46a8345ef5c763bd7322b8
5
5
  SHA512:
6
- metadata.gz: 86053394416ccc0c1a3384d462e2d0f7e8331bdf047395551ba32533c457478b8ae71c88ceb2bd9aeddda14d7cf6673127b37d62704937d1421cb75bb5c9b1f2
7
- data.tar.gz: 5618d59de9053264b46cd86010dd1cb49985d334ec4a96380ee1da1774ebd2aeddea99a4d3d804ad374c341a72d6e2d336eed9b169ed84f7e238ad7d0d51cff4
6
+ metadata.gz: 479914f23b6d8018c02403fe7441c72dc2dd2aebf9b00c64e6c50e577d7e71b1537f5655d55b2be300cce6a37998c06da016e8d5ef32279b8ceb665d19338aaa
7
+ data.tar.gz: b73672f8f5fff324a45f75fe88adecb0916c1ff88e098ed83331537c8de04bd45a42a2d962eee4f52bba90816ee621c317deef58b4fddfab6681b35bd25a1e12
@@ -4,6 +4,12 @@
4
4
 
5
5
  Empty.
6
6
 
7
+ ## v1.15.2
8
+
9
+ - [Feature] Add option --splay from splay
10
+ - [Feature] Add option --skip-cookbook-sync from chef-client v12.8.1
11
+ - [Cleanup] inherit named_run_list
12
+
7
13
  ## v1.15.1
8
14
 
9
15
  - Follow Upstream: Support option both identity_file and ssh_identity_file for zero bootstrap. #88
@@ -1,5 +1,6 @@
1
1
  require 'chef/knife'
2
2
  require 'chef/knife/zero_base'
3
+ require 'chef/application/client'
3
4
  require 'knife-zero/bootstrap_ssh'
4
5
  require 'knife-zero/helper'
5
6
 
@@ -18,6 +19,18 @@ class Chef
18
19
  self.options = Ssh.options.merge(self.options)
19
20
  self.options[:use_sudo_password] = Bootstrap.options[:use_sudo_password]
20
21
 
22
+ ## Import Features from chef-client
23
+ ## > 12.5.1
24
+ self.options[:named_run_list] = Chef::Application::Client.options[:named_run_list]
25
+
26
+ if ::Knife::Zero::Helper.required_chef_version?('12.8.1')
27
+ self.options[:skip_cookbook_sync] = Chef::Application::Client.options[:skip_cookbook_sync]
28
+ end
29
+
30
+ option :splay,
31
+ :long => "--splay SECONDS",
32
+ :description => "The splay time for running at intervals, in seconds",
33
+ :proc => lambda { |s| s.to_i }
21
34
 
22
35
  option :use_sudo,
23
36
  :long => "--[no-]sudo",
@@ -34,12 +47,6 @@ class Chef
34
47
  :default => nil,
35
48
  :proc => lambda { |o| o.to_s }
36
49
 
37
- ## For support policy_document_databag(old style)
38
- option :named_run_list,
39
- :short => "-n NAMED_RUN_LIST",
40
- :long => "--named-run-list NAMED_RUN_LIST",
41
- :description => "Use a policyfile's named run list instead of the default run list"
42
-
43
50
  option :client_version,
44
51
  :long => "--client-version [latest|VERSION]",
45
52
  :description => "Up or downgrade omnibus chef-client before converge.",
@@ -74,7 +81,9 @@ class Chef
74
81
  s << ' -l debug' if @config[:verbosity] and @config[:verbosity] >= 2
75
82
  s << " -S http://127.0.0.1:#{::Knife::Zero::Helper.zero_remote_port}"
76
83
  s << " -o #{@config[:override_runlist]}" if @config[:override_runlist]
84
+ s << " --splay #{@config[:splay]}" if @config[:splay]
77
85
  s << " -n #{@config[:named_run_list]}" if @config[:named_run_list]
86
+ s << " --skip-cookbook-sync" if @config[:skip_cookbook_sync]
78
87
  s << " -W" if @config[:why_run]
79
88
  Chef::Log.info "Remote command: " + s
80
89
  s
@@ -36,6 +36,10 @@ module Knife
36
36
  raise e
37
37
  end
38
38
  end
39
+
40
+ def self.required_chef_version?(ver)
41
+ Gem::Version.new(Chef::VERSION) >= Gem::Version.new(ver)
42
+ end
39
43
  end
40
44
  end
41
45
  end
@@ -1,6 +1,6 @@
1
1
  module Knife
2
2
  module Zero
3
- VERSION = "1.15.1"
3
+ VERSION = "1.15.2"
4
4
  MAJOR, MINOR, TINY = VERSION.split('.')
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.15.1
4
+ version: 1.15.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - sawanoboly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-03 00:00:00.000000000 Z
11
+ date: 2016-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler