knife-zero 1.12.0 → 1.12.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: f164d9e687c64fd99f26f272cf78f55d68d5da0d
4
- data.tar.gz: fa5521a178e6cc1c8013afb3b59f4ae5f54bc2b6
3
+ metadata.gz: 1c14d86c9f5ba40c4758f6bc7553e0e3f299533f
4
+ data.tar.gz: 049fcba1509a56553e1547c0d2dc98d8854db324
5
5
  SHA512:
6
- metadata.gz: 5625962c8b19e5521c8fa01551627589f871ba386d49742d75c73f2a0c1ae0faa0307bba1504cf6f56a9ec093ed4c7968000c243122012a94b6541274a23b5f5
7
- data.tar.gz: cbc352df56bd72710c7f201da748b882493bf7d217eb69940d7dde5df6aca7e4026db7f396a307e22a91fc2838dbbed5ac881f1377d40ed6b83a9c2988a925e4
6
+ metadata.gz: e9cd094110b0219b0ed1ba74d854f44e5f6a624d195d202cfa4cdc3f980cde6004ba9d4978384c2f382f835993dcc4d20bbd7644200d3dc1aeb69b41ad55b609
7
+ data.tar.gz: d24fcd3e46f799d4098bb69407b57119bd3b1c4b1c268d868fb384ff93b0cce9710842c4f1682ec50cbee35f6458cc06fd9656bd2014f0d0ff0d1ebb0b6c2381
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+
6
+ ## v1.12.1
7
+
8
+ - Typo: start_chef_appy => start_chef_apply
9
+ - Feature: Import json_attribs option from chef-apply to zero-apply
10
+
5
11
  ## v1.12.0
6
12
 
7
13
  - Feature: New subcommand `zero apply`
@@ -1,6 +1,7 @@
1
1
  require 'chef/knife'
2
2
  require 'chef/knife/zero_base'
3
3
  require 'chef/knife/zero_converge'
4
+ require 'chef/application/apply'
4
5
  require 'knife-zero/bootstrap_ssh'
5
6
  require 'knife-zero/helper'
6
7
  require 'shellwords'
@@ -29,21 +30,20 @@ class Chef
29
30
  :default => "",
30
31
  :proc => lambda { |o| o.start_with?('@') ? File.read(o[1..-1]).shellescape : (o.to_s).shellescape }
31
32
 
32
- option :minimal_ohai,
33
- :long => "--[no-]minimal-ohai",
34
- :description => "Only run the bare minimum ohai plugins chef needs to function (false by default)",
35
- :boolean => true,
36
- :default => false,
37
- :proc => lambda { |o| o.to_s }
33
+ ## Import from Chef-Apply
34
+ self.options[:minimal_ohai] = Chef::Application::Apply.options[:minimal_ohai]
35
+ self.options[:json_attribs] = Chef::Application::Apply.options[:json_attribs]
36
+ self.options[:json_attribs][:description] = "Load attributes from a JSON file or URL (retrieves from the remote node)"
37
+
38
38
 
39
39
  def initialize(argv=[])
40
40
  super
41
41
  self.configure_chef
42
42
 
43
- @name_args = [@name_args[0], start_chef_appy]
43
+ @name_args = [@name_args[0], start_chef_apply]
44
44
  end
45
45
 
46
- def start_chef_appy
46
+ def start_chef_apply
47
47
  if @config[:verbosity] and @config[:verbosity] >= 2
48
48
  log_level = 'debug'
49
49
  else
@@ -56,6 +56,7 @@ class Chef
56
56
  s << " -l #{log_level}"
57
57
  s << " -s"
58
58
  s << " --minimal-ohai" if @config[:minimal_ohai]
59
+ s << " -j #{@config[:json_attribs]}" if @config[:json_attribs]
59
60
  s << " -W" if @config[:why_run]
60
61
  Chef::Log.info "Remote command: " + s
61
62
  s
@@ -1,6 +1,6 @@
1
1
  module Knife
2
2
  module Zero
3
- VERSION = "1.12.0"
3
+ VERSION = "1.12.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.12.0
4
+ version: 1.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - sawanoboly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-04 00:00:00.000000000 Z
11
+ date: 2016-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler