def setup_bootstrap_args(args, data)
      # We need to remove the --bootstrap option, if it exists
      args -= ['--bootstrap']
      args[1] = data['ssh_host']

      # And set up the node-specific data but ONLY if defined
      args += ['-N', data['name']] if data['name']
      args += ['-E', data['chef_environment']] if data['chef_environment']
      args += ['--ssh-port', data['ssh_port']] if data['ssh_port']
      args += ['--run-list', data['run_list'].join(',')] if data['run_list']
      attrs = attributes_for_bootstrap(data)
      args += ['--json-attributes', attrs.to_json] unless attrs.empty?
      args
    end
def setup_bootstrap_args(args, data)
      # We need to remove the --bootstrap option, if it exists
      args -= ['--bootstrap']
      args[1] = data['ssh_host']

      # And set up the node-specific data but ONLY if defined
      args += ['-N', data['name']] if data['name']
      args += ['-E', data['chef_environment']] if data['chef_environment']
      args += ['--ssh-port', data['ssh_port']] if data['ssh_port']
      args += ['--run-list', data['run_list'].join(',')] if data['run_list']
      attrs = attributes_for_bootstrap(data)
      args += ['--json-attributes', attrs.to_json] unless attrs.empty?
      args
    end
rubocop:disable Metrics/AbcSize