knife-zero 1.0.0 → 1.0.1

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: 5b49630ab7f49b0d6124a0a36f17b15c486832c0
4
- data.tar.gz: 0062f6d3d584a135c438865e71df980a18986604
3
+ metadata.gz: 87d616763175d70f259654a44a6e2d59c126b557
4
+ data.tar.gz: 9c1c29d5ea990519e3af4e9141139f5def314075
5
5
  SHA512:
6
- metadata.gz: 3b57450d3140a1d518e4908bf8d8419956cd41cc6bbf5b6cad62450cc2bfef2af1c3824e5ae6a871557a53e221da3e82e0367044223e7b98ebf1c5a7bdb7b9b9
7
- data.tar.gz: ab553ebadbc9e3c9608d0916e9e36c90e2b92b222c490bb3182e6855a68ebd4b9ce2282659e21cf473c1397a6313fa08724968228f05931932d1293c5b427c90
6
+ metadata.gz: ea8ed60e6ff1baaf543d588c5b3a5541d5f1445785d81963c34ced63217825f43343256c96a487f54ba912c0e61928ad79edc0bbf4a8ccb3a67a4fcb3b2ee03e
7
+ data.tar.gz: 0d867e3a548926de579d22e2168beb48e7c2eb30038b0fe7b9ebe25bbcee7ffaf7d1388237b2d3f4c9a0ace7f219c9838fe8fcd978ca3ad762113999c2bca685
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog of knife-zero
2
2
 
3
+ ## v1.0.1
4
+
5
+ - Feature: Support override run-list for zero chef_client.
6
+
3
7
  ## v1.0.0
4
8
 
5
9
  - Code cleanup: use Chef::Knife::SSH framework. HT: @Yasushi
data/README.md CHANGED
@@ -115,7 +115,10 @@ xxx.xxx.xxx.xxx 08:41:37 up 143 days, 2:32, 4 users, load average: 0.00, 0.0
115
115
  Search nodes from local chef-repo directory, and run command at remote node.
116
116
 
117
117
  Supported options are mostly the same as `knife ssh`.
118
- And it supports why-run(`-W, --why-run`).
118
+ And it supports below.
119
+
120
+ - why-run(`-W, --why-run`)
121
+ - Override run-list(`-o RunlistItem,RunlistItem, --override-runlist`). It skips save node.json on workstation.
119
122
 
120
123
  #### Example
121
124
 
@@ -7,6 +7,7 @@ class Chef
7
7
  class ZeroChefClient < Chef::Knife::BootstrapSsh
8
8
  include Chef::Knife::ZeroBase
9
9
  deps do
10
+ require 'chef/run_list/run_list_item'
10
11
  Chef::Knife::BootstrapSsh.load_deps
11
12
  end
12
13
 
@@ -30,6 +31,14 @@ class Chef
30
31
  :description => "execute the chef-client via sudo",
31
32
  :boolean => true
32
33
 
34
+ option :override_runlist,
35
+ :short => "-o RunlistItem,RunlistItem...",
36
+ :long => "--override-runlist RunlistItem,RunlistItem...",
37
+ :description => "Replace current run list with specified items for a single run. It skips save node.json on local",
38
+ :default => nil,
39
+ :proc => lambda { |o| o.to_s }
40
+
41
+
33
42
  def initialize(argv=[])
34
43
  super
35
44
  @name_args = [@name_args[0], start_chef_client]
@@ -41,6 +50,7 @@ class Chef
41
50
  s = "#{client_path}"
42
51
  s << ' -l debug' if @config[:verbosity] and @config[:verbosity] >= 2
43
52
  s << " -S http://127.0.0.1:8889"
53
+ s << " -o #{@config[:override_runlist]}" if @config[:override_runlist]
44
54
  s << " -W" if @config[:why_run]
45
55
  s
46
56
  end
@@ -1,6 +1,6 @@
1
1
  module Knife
2
2
  module Zero
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
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.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - sawanoboly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-21 00:00:00.000000000 Z
11
+ date: 2014-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler