diff options
author | Vijay Mali <vijay.mali@msystechnologies.com> | 2019-04-25 17:51:30 +0530 |
---|---|---|
committer | Vijay Mali <vijay.mali@msystechnologies.com> | 2019-04-30 14:12:00 +0530 |
commit | fd4a38fcbf9d6d9463c1a899adac6223baf3eaa6 (patch) | |
tree | eff56e139f4d54964103299c3d1bd072e5cfb89e /lib/chef/knife/core/status_presenter.rb | |
parent | c36403d741d7d51159fac3233e7eb5801eb44db4 (diff) | |
download | chef-fd4a38fcbf9d6d9463c1a899adac6223baf3eaa6.tar.gz |
Fixed empty value for knife status long output
Signed-off-by: Vijay Mali <vijay.mali@msystechnologies.com>
Diffstat (limited to 'lib/chef/knife/core/status_presenter.rb')
-rw-r--r-- | lib/chef/knife/core/status_presenter.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/chef/knife/core/status_presenter.rb b/lib/chef/knife/core/status_presenter.rb index 32ad6a13ae..dfd8eb8956 100644 --- a/lib/chef/knife/core/status_presenter.rb +++ b/lib/chef/knife/core/status_presenter.rb @@ -100,7 +100,14 @@ class Chef fqdn = (node[:ec2] && node[:ec2][:public_hostname]) || node[:fqdn] name = node["name"] || node.name - run_list = (node["run_list"]).to_s if config[:run_list] + if config[:run_list] + if config[:long_output] + run_list = node.run_list.map { |rl| "#{rl.type}[#{rl.name}]" } + else + run_list = node["run_list"] + end + end + line_parts = Array.new if node["ohai_time"] @@ -128,7 +135,7 @@ class Chef line_parts << fqdn if fqdn line_parts << ip if ip - line_parts << run_list if run_list + line_parts << run_list.to_s if run_list if node["platform"] platform = node["platform"].dup |