Inventory: ERROR! non-essential-servers.py:2: Expected key=value host variable assignment, got: ldap3

#!/usr/bin/env python

-- coding: utf-8 -

import class and constants

from ldap3 import Server, Connection, ALL, NTLM, Tls
import json
import ssl

define the server and the connection

server = Server(‘server’, use_ssl=True)
conn = Connection(server, user=“domain\kace_ldap”, password=“password”, authentication=NTLM, auto_bind=True)
#conn = Connection(server, user=ldapusr, password=ldappwd, authentication=NTLM, auto_bind=True)

conn.open()
conn.bind()
conn.entries
conn.search(‘OU=Servers, OU=OU, DC=Domain, DC=com’, ‘(objectclass=computer)’, attributes=[“name”])

names =
for x in conn.response:
names.append(x[‘attributes’][‘name’][0])

conn.unbind()

hosts = {}
hosts[‘hosts’] = names
var = {‘a’:True}

export = {}
export[‘windows’] = hosts
print json.dumps(export, sort_keys=True, indent=4, separators=(‘,’, ': '))