chef/cookbooks/updater/recipes/default.rb
Avoid deeply nested control flow statements. Open
Open
if count >= 5
message = "Ran \"#{zypper_command}\" more than five times, and it still requires more runs."
Chef::Log.fatal(message)
node.save # node is always dirty due to one_shot_run
raise message
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if node[:updater][:do_reboot]
Chef::Log.info("Will reboot node at the end of chef run.")
node.run_state[:reboot] = true
node[:updater][:need_reboot] = false
else
- Create a ticketCreate a ticket