1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #10658 from erinn/freeipa_compat

Changes to api in FreeIPA > 4.0 compatibility fix.
This commit is contained in:
Brian Coca 2015-04-09 10:05:21 -04:00
commit fe2cc6dd02

View file

@ -13,7 +13,11 @@ def initialize():
api.bootstrap(context='cli')
api.finalize()
api.Backend.xmlclient.connect()
try:
api.Backend.rpcclient.connect()
except AttributeError:
#FreeIPA < 4.0 compatibility
api.Backend.xmlclient.connect()
return api