chef 15.0.298 → 15.0.300

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
  SHA256:
3
- metadata.gz: b293f2dac872896fb4ac6d2dc09560081d1006de026029e49c6606221705ffdd
4
- data.tar.gz: 5f7d52f20ee3cc309e7cfd39d0c56dae508932ee5bc09adc715c302add02f9c5
3
+ metadata.gz: e4b36b19afe184d6706720584f6729c6a3b46f2a32e8ed67eeca373415b48690
4
+ data.tar.gz: e77a1e46552fdbe8b14d679aa492c66214681d61c72af1a4831ab8212ec5bfb4
5
5
  SHA512:
6
- metadata.gz: 44f5de263c381eae657200dec44bc46076b512ab16697e34a35932b02cdd2ea61e68a98c4ec46e52413959b7ed05b6305cd1770d79ddf5f5f2a0b7ada48ef683
7
- data.tar.gz: 754dcd27ab528570a747ee28de3578274d1531044953b18f05aec2cd440281e88660958f2be91d5c04ef59ea46d50a7df315dcd215c333c1389d6f0f99209cb8
6
+ metadata.gz: ea0e6d34fa26f682f679b4a2c5028fb079c06c0ea6c81439ae884101b592699151a8ef78fcf082ebb77143d3a80f7ac26f3092dbe403cfeedb5c92deb55ba961
7
+ data.tar.gz: c35e472b0853dd9d850fd5aa5b1a3858073d3306f4186913e8914270376cbce52e68830b4e5bdd709e6ff3be22e8aa6ca4b89fce361c2f2a5126848de19c0b17
@@ -27,8 +27,10 @@ require "tempfile"
27
27
  require_relative "../providers"
28
28
  require_relative "../resources"
29
29
  require_relative "../dist"
30
+ require "license_acceptance/cli_flags/mixlib_cli"
30
31
 
31
32
  class Chef::Application::Apply < Chef::Application
33
+ include LicenseAcceptance::CLIFlags::MixlibCLI
32
34
 
33
35
  banner "Usage: chef-apply [RECIPE_FILE | -e RECIPE_TEXT | -s] [OPTIONS]"
34
36
 
@@ -30,10 +30,12 @@ require "pathname"
30
30
  require "chef-config/mixin/dot_d"
31
31
  require "mixlib/archive"
32
32
  require_relative "../dist"
33
+ require "license_acceptance/cli_flags/mixlib_cli"
33
34
 
34
35
  class Chef::Application::Solo < Chef::Application
35
36
  include Chef::Mixin::ShellOut
36
37
  include ChefConfig::Mixin::DotD
38
+ include LicenseAcceptance::CLIFlags::MixlibCLI
37
39
 
38
40
  option :config_file,
39
41
  short: "-c CONFIG",
@@ -865,6 +865,7 @@ class Chef
865
865
  def ssh_opts
866
866
  opts = {}
867
867
  return opts if winrm?
868
+ opts[:pty] = true # ensure we can talk to systems with requiretty set true in sshd config
868
869
  opts[:non_interactive] = true # Prevent password prompts from underlying net/ssh
869
870
  opts[:forward_agent] = (config_value(:ssh_forward_agent) === true)
870
871
  opts[:connection_timeout] = session_timeout
@@ -23,7 +23,7 @@ require_relative "version_string"
23
23
 
24
24
  class Chef
25
25
  CHEF_ROOT = File.expand_path("../..", __FILE__)
26
- VERSION = Chef::VersionString.new("15.0.298")
26
+ VERSION = Chef::VersionString.new("15.0.300")
27
27
  end
28
28
 
29
29
  #
@@ -1015,6 +1015,7 @@ describe Chef::Knife::Bootstrap do
1015
1015
  verify_host_key: false,
1016
1016
  port: 9999,
1017
1017
  non_interactive: true,
1018
+ pty: true,
1018
1019
  }
1019
1020
  end
1020
1021
 
@@ -1069,6 +1070,7 @@ describe Chef::Knife::Bootstrap do
1069
1070
  verify_host_key: false, # Config
1070
1071
  port: 12, # cli
1071
1072
  non_interactive: true,
1073
+ pty: true,
1072
1074
  }
1073
1075
  end
1074
1076
 
@@ -1120,6 +1122,7 @@ describe Chef::Knife::Bootstrap do
1120
1122
  sudo_password: "blah",
1121
1123
  verify_host_key: true,
1122
1124
  non_interactive: true,
1125
+ pty: true,
1123
1126
  }
1124
1127
  end
1125
1128
  it "generates a config hash using the CLI options and pulling nothing from Chef::Config" do
@@ -1143,6 +1146,7 @@ describe Chef::Knife::Bootstrap do
1143
1146
  sudo: false,
1144
1147
  verify_host_key: "always",
1145
1148
  non_interactive: true,
1149
+ pty: true,
1146
1150
  connection_timeout: 60,
1147
1151
  }
1148
1152
  end
@@ -1491,33 +1495,38 @@ describe Chef::Knife::Bootstrap do
1491
1495
 
1492
1496
  context "for ssh" do
1493
1497
  let(:connection_protocol) { "ssh" }
1498
+ let(:default_opts) do
1499
+ {
1500
+ non_interactive: true,
1501
+ pty: true,
1502
+ forward_agent: false,
1503
+ connection_timeout: 60,
1504
+ }
1505
+ end
1506
+
1507
+ context "by default" do
1508
+ it "returns a configuration hash with appropriate defaults" do
1509
+ expect(knife.ssh_opts).to eq default_opts
1510
+ end
1511
+ end
1512
+
1494
1513
  context "when ssh_forward_agent has a value" do
1495
1514
  before do
1496
1515
  knife.config[:ssh_forward_agent] = true
1497
1516
  end
1498
- it "returns a configuration hash with forward_agent set to true. non-interactive is always true" do
1499
- expect(knife.ssh_opts).to eq({ forward_agent: true, non_interactive: true, connection_timeout: 60 })
1500
- end
1501
- end
1502
- context "when ssh_forward_agent is not set" do
1503
- it "returns a configuration hash with forward_agent set to false. non-interactive is always true" do
1504
- expect(knife.ssh_opts).to eq({ forward_agent: false, non_interactive: true, connection_timeout: 60 })
1517
+ it "returns a default configuration hash with forward_agent set to true" do
1518
+ expect(knife.ssh_opts).to eq(default_opts.merge(forward_agent: true))
1505
1519
  end
1506
1520
  end
1507
1521
  context "when session_timeout has a value" do
1508
1522
  before do
1509
1523
  knife.config[:session_timeout] = 120
1510
1524
  end
1511
- it "returns a configuration hash with connection_timeout value." do
1512
- expect(knife.ssh_opts).to eq({ forward_agent: false, non_interactive: true, connection_timeout: 120 })
1525
+ it "returns a default configuration hash with updated timeout value." do
1526
+ expect(knife.ssh_opts).to eq(default_opts.merge(connection_timeout: 120))
1513
1527
  end
1514
1528
  end
1515
1529
 
1516
- context "when session_timeout is not set" do
1517
- it "returns a configuration hash with connection_timeout default value." do
1518
- expect(knife.ssh_opts).to eq({ forward_agent: false, non_interactive: true, connection_timeout: 60 })
1519
- end
1520
- end
1521
1530
  end
1522
1531
 
1523
1532
  context "for winrm" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef
3
3
  version: !ruby/object:Gem::Version
4
- version: 15.0.298
4
+ version: 15.0.300
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Jacob
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-15 00:00:00.000000000 Z
11
+ date: 2019-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef-config
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 15.0.298
19
+ version: 15.0.300
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 15.0.298
26
+ version: 15.0.300
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: train-core
29
29
  requirement: !ruby/object:Gem::Requirement