def retry_execution(retry_message, times = AgentConfig.max_packages_install_retries)
      count   = 0
      success = false
      begin
        count   += 1
        success = yield
        @audit.append_info("\n#{retry_message}\n") unless success || count > times
      end while !success && count <= times
      success
    end
def retry_execution(retry_message, times = AgentConfig.max_packages_install_retries)
      count   = 0
      success = false
      begin
        count   += 1
        success = yield
        @audit.append_info("\n#{retry_message}\n") unless success || count > times
      end while !success && count <= times
      success
    end
Retry executing given block given number of times
 Block should return true when it succeeds

 === Parameters
 retry_message(String):: Message to audit before retrying
 times(Integer):: Number of times block should be retried before giving up

 === Block
 Block to be executed

 === Return
 success(Boolean):: true if execution was successful, false otherwise.