def node_bootstrap(node_data)
      node_name = node_data['name']
      state = :skipped_ssh
      if node_data['ssh_host']
        exists = resource_exists?("nodes/#{node_name}")
        if config[:overwrite] || !exists
          success = run_bootstrap(node_data, @bootstrap_args, exists)
          state = success ? :bootstrapped : :failed
        else
          state = :existed
        end
      end
      @results[state] << node_name
      success
    end
def node_bootstrap(node_data)
      node_name = node_data['name']
      state = :skipped_ssh
      if node_data['ssh_host']
        exists = resource_exists?("nodes/#{node_name}")
        if config[:overwrite] || !exists
          success = run_bootstrap(node_data, @bootstrap_args, exists)
          state = success ? :bootstrapped : :failed
        else
          state = :existed
        end
      end
      @results[state] << node_name
      success
    end
rubocop:disable Metrics/MethodLength