summaryrefslogtreecommitdiff
path: root/lib/ansible/modules/identity
diff options
context:
space:
mode:
authorAbhijeet Kasurde <akasurde@redhat.com>2017-08-02 14:38:49 +0530
committerToshio Kuratomi <a.badger@gmail.com>2017-08-02 09:53:02 -0700
commit5e2184c683838285dd1d88985f62ccb25926a763 (patch)
tree4c972560e04db22f5d0cdb409fb9294dbdaf013f /lib/ansible/modules/identity
parent3d20a2ea822efc9f2060e0d27561cc8131f69064 (diff)
downloadansible-5e2184c683838285dd1d88985f62ccb25926a763.tar.gz
Fixing broken imports and get_exception for ipa
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Diffstat (limited to 'lib/ansible/modules/identity')
-rw-r--r--lib/ansible/modules/identity/cyberark/cyberark_authentication.py20
-rw-r--r--lib/ansible/modules/identity/ipa/ipa_dnsrecord.py29
-rw-r--r--lib/ansible/modules/identity/ipa/ipa_group.py28
-rw-r--r--lib/ansible/modules/identity/ipa/ipa_hbacrule.py28
-rw-r--r--lib/ansible/modules/identity/ipa/ipa_host.py29
-rw-r--r--lib/ansible/modules/identity/ipa/ipa_hostgroup.py28
-rw-r--r--lib/ansible/modules/identity/ipa/ipa_role.py28
-rw-r--r--lib/ansible/modules/identity/ipa/ipa_sudocmd.py28
-rw-r--r--lib/ansible/modules/identity/ipa/ipa_sudocmdgroup.py29
-rw-r--r--lib/ansible/modules/identity/ipa/ipa_sudorule.py28
-rw-r--r--lib/ansible/modules/identity/ipa/ipa_user.py27
-rw-r--r--lib/ansible/modules/identity/opendj/opendj_backendprop.py27
12 files changed, 109 insertions, 220 deletions
diff --git a/lib/ansible/modules/identity/cyberark/cyberark_authentication.py b/lib/ansible/modules/identity/cyberark/cyberark_authentication.py
index 416c08cbdf..ad576eec5a 100644
--- a/lib/ansible/modules/identity/cyberark/cyberark_authentication.py
+++ b/lib/ansible/modules/identity/cyberark/cyberark_authentication.py
@@ -1,21 +1,9 @@
#!/usr/bin/python
-#
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
-#
+# Copyright: (c) 2017, Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community',
diff --git a/lib/ansible/modules/identity/ipa/ipa_dnsrecord.py b/lib/ansible/modules/identity/ipa/ipa_dnsrecord.py
index 8e3ff794af..f146add517 100644
--- a/lib/ansible/modules/identity/ipa/ipa_dnsrecord.py
+++ b/lib/ansible/modules/identity/ipa/ipa_dnsrecord.py
@@ -1,22 +1,10 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
-# (c) 2017, Abhijeet Kasurde (akasurde@redhat.com)
-#
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+# Copyright: (c) 2017, Abhijeet Kasurde (akasurde@redhat.com)
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
ANSIBLE_METADATA = {
'metadata_version': '1.0',
@@ -118,9 +106,11 @@ dnsrecord:
type: dict
'''
+import traceback
+
from ansible.module_utils.basic import AnsibleModule
-from ansible.module_utils.pycompat24 import get_exception
from ansible.module_utils.ipa import IPAClient
+from ansible.module_utils._text import to_native
class DNSRecordIPAClient(IPAClient):
@@ -229,9 +219,8 @@ def main():
password=module.params['ipa_pass'])
changed, record = ensure(module, client)
module.exit_json(changed=changed, record=record)
- except Exception:
- e = get_exception()
- module.fail_json(msg=str(e))
+ except Exception as e:
+ module.fail_json(msg=to_native(e), exception=traceback.format_exc())
if __name__ == '__main__':
diff --git a/lib/ansible/modules/identity/ipa/ipa_group.py b/lib/ansible/modules/identity/ipa/ipa_group.py
index 2132c3ee22..4f72edce6e 100644
--- a/lib/ansible/modules/identity/ipa/ipa_group.py
+++ b/lib/ansible/modules/identity/ipa/ipa_group.py
@@ -1,19 +1,10 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+# Copyright: (c) 2017, Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.0',
'status': ['preview'],
@@ -140,9 +131,11 @@ group:
type: dict
'''
+import traceback
+
from ansible.module_utils.basic import AnsibleModule
-from ansible.module_utils.pycompat24 import get_exception
from ansible.module_utils.ipa import IPAClient
+from ansible.module_utils._text import to_native
class GroupIPAClient(IPAClient):
@@ -280,9 +273,8 @@ def main():
password=module.params['ipa_pass'])
changed, group = ensure(module, client)
module.exit_json(changed=changed, group=group)
- except Exception:
- e = get_exception()
- module.fail_json(msg=str(e))
+ except Exception as e:
+ module.fail_json(msg=to_native(e), exception=traceback.format_exc())
if __name__ == '__main__':
diff --git a/lib/ansible/modules/identity/ipa/ipa_hbacrule.py b/lib/ansible/modules/identity/ipa/ipa_hbacrule.py
index 2afee04611..6d1ed4c633 100644
--- a/lib/ansible/modules/identity/ipa/ipa_hbacrule.py
+++ b/lib/ansible/modules/identity/ipa/ipa_hbacrule.py
@@ -1,19 +1,10 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+# Copyright: (c) 2017, Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.0',
'status': ['preview'],
@@ -171,9 +162,11 @@ hbacrule:
type: dict
'''
+import traceback
+
from ansible.module_utils.basic import AnsibleModule
-from ansible.module_utils.pycompat24 import get_exception
from ansible.module_utils.ipa import IPAClient
+from ansible.module_utils._text import to_native
class HBACRuleIPAClient(IPAClient):
@@ -374,9 +367,8 @@ def main():
password=module.params['ipa_pass'])
changed, hbacrule = ensure(module, client)
module.exit_json(changed=changed, hbacrule=hbacrule)
- except Exception:
- e = get_exception()
- module.fail_json(msg=str(e))
+ except Exception as e:
+ module.fail_json(msg=to_native(e), exception=traceback.format_exc())
if __name__ == '__main__':
diff --git a/lib/ansible/modules/identity/ipa/ipa_host.py b/lib/ansible/modules/identity/ipa/ipa_host.py
index c6c1c96ce6..a37055f951 100644
--- a/lib/ansible/modules/identity/ipa/ipa_host.py
+++ b/lib/ansible/modules/identity/ipa/ipa_host.py
@@ -1,19 +1,10 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+# Copyright: (c) 2017, Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.0',
'status': ['preview'],
@@ -165,9 +156,11 @@ host_diff:
type: list
'''
+import traceback
+
from ansible.module_utils.basic import AnsibleModule
-from ansible.module_utils.pycompat24 import get_exception
from ansible.module_utils.ipa import IPAClient
+from ansible.module_utils._text import to_native
class HostIPAClient(IPAClient):
@@ -292,10 +285,8 @@ def main():
password=module.params['ipa_pass'])
changed, host = ensure(module, client)
module.exit_json(changed=changed, host=host)
- except Exception:
- e = get_exception()
- module.fail_json(msg=str(e))
-
+ except Exception as e:
+ module.fail_json(msg=to_native(e), exception=traceback.format_exc())
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/identity/ipa/ipa_hostgroup.py b/lib/ansible/modules/identity/ipa/ipa_hostgroup.py
index 276b526692..66ac5743cf 100644
--- a/lib/ansible/modules/identity/ipa/ipa_hostgroup.py
+++ b/lib/ansible/modules/identity/ipa/ipa_hostgroup.py
@@ -1,19 +1,10 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+# Copyright: (c) 2017, Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.0',
'status': ['preview'],
@@ -118,9 +109,11 @@ hostgroup:
type: dict
'''
+import traceback
+
from ansible.module_utils.basic import AnsibleModule
-from ansible.module_utils.pycompat24 import get_exception
from ansible.module_utils.ipa import IPAClient
+from ansible.module_utils._text import to_native
class HostGroupIPAClient(IPAClient):
@@ -242,9 +235,8 @@ def main():
password=module.params['ipa_pass'])
changed, hostgroup = ensure(module, client)
module.exit_json(changed=changed, hostgroup=hostgroup)
- except Exception:
- e = get_exception()
- module.fail_json(msg=str(e))
+ except Exception as e:
+ module.fail_json(msg=to_native(e), exception=traceback.format_exc())
if __name__ == '__main__':
diff --git a/lib/ansible/modules/identity/ipa/ipa_role.py b/lib/ansible/modules/identity/ipa/ipa_role.py
index 1d6959b9b3..1604434b0f 100644
--- a/lib/ansible/modules/identity/ipa/ipa_role.py
+++ b/lib/ansible/modules/identity/ipa/ipa_role.py
@@ -1,19 +1,10 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+# Copyright: (c) 2017, Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.0',
'status': ['preview'],
@@ -160,9 +151,11 @@ role:
type: dict
'''
+import traceback
+
from ansible.module_utils.basic import AnsibleModule
-from ansible.module_utils.pycompat24 import get_exception
from ansible.module_utils.ipa import IPAClient
+from ansible.module_utils._text import to_native
class RoleIPAClient(IPAClient):
@@ -332,9 +325,8 @@ def main():
password=module.params['ipa_pass'])
changed, role = ensure(module, client)
module.exit_json(changed=changed, role=role)
- except Exception:
- e = get_exception()
- module.fail_json(msg=str(e))
+ except Exception as e:
+ module.fail_json(msg=to_native(e), exception=traceback.format_exc())
if __name__ == '__main__':
diff --git a/lib/ansible/modules/identity/ipa/ipa_sudocmd.py b/lib/ansible/modules/identity/ipa/ipa_sudocmd.py
index 13ba6d9048..db1daca27f 100644
--- a/lib/ansible/modules/identity/ipa/ipa_sudocmd.py
+++ b/lib/ansible/modules/identity/ipa/ipa_sudocmd.py
@@ -1,19 +1,10 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+# Copyright: (c) 2017, Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.0',
'status': ['preview'],
@@ -97,9 +88,11 @@ sudocmd:
type: dict
'''
+import traceback
+
from ansible.module_utils.basic import AnsibleModule
-from ansible.module_utils.pycompat24 import get_exception
from ansible.module_utils.ipa import IPAClient
+from ansible.module_utils._text import to_native
class SudoCmdIPAClient(IPAClient):
@@ -187,9 +180,8 @@ def main():
password=module.params['ipa_pass'])
changed, sudocmd = ensure(module, client)
module.exit_json(changed=changed, sudocmd=sudocmd)
- except Exception:
- e = get_exception()
- module.fail_json(msg=str(e))
+ except Exception as e:
+ module.fail_json(msg=to_native(e), exception=traceback.format_exc())
if __name__ == '__main__':
diff --git a/lib/ansible/modules/identity/ipa/ipa_sudocmdgroup.py b/lib/ansible/modules/identity/ipa/ipa_sudocmdgroup.py
index 10af297fc3..9becc98867 100644
--- a/lib/ansible/modules/identity/ipa/ipa_sudocmdgroup.py
+++ b/lib/ansible/modules/identity/ipa/ipa_sudocmdgroup.py
@@ -1,19 +1,10 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+# Copyright: (c) 2017, Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.0',
'status': ['preview'],
@@ -104,9 +95,11 @@ sudocmdgroup:
type: dict
'''
+import traceback
+
from ansible.module_utils.basic import AnsibleModule
-from ansible.module_utils.pycompat24 import get_exception
from ansible.module_utils.ipa import IPAClient
+from ansible.module_utils._text import to_native
class SudoCmdGroupIPAClient(IPAClient):
@@ -213,10 +206,8 @@ def main():
password=module.params['ipa_pass'])
changed, sudocmdgroup = ensure(module, client)
module.exit_json(changed=changed, sudorule=sudocmdgroup)
- except Exception:
- e = get_exception()
- module.fail_json(msg=str(e))
-
+ except Exception as e:
+ module.fail_json(msg=to_native(e), exception=traceback.format_exc())
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/identity/ipa/ipa_sudorule.py b/lib/ansible/modules/identity/ipa/ipa_sudorule.py
index 60687543f5..dd25d34820 100644
--- a/lib/ansible/modules/identity/ipa/ipa_sudorule.py
+++ b/lib/ansible/modules/identity/ipa/ipa_sudorule.py
@@ -1,19 +1,10 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+# Copyright: (c) 2017, Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.0',
'status': ['preview'],
@@ -156,9 +147,11 @@ sudorule:
type: dict
'''
+import traceback
+
from ansible.module_utils.basic import AnsibleModule
-from ansible.module_utils.pycompat24 import get_exception
from ansible.module_utils.ipa import IPAClient
+from ansible.module_utils._text import to_native
class SudoRuleIPAClient(IPAClient):
@@ -381,9 +374,8 @@ def main():
password=module.params['ipa_pass'])
changed, sudorule = ensure(module, client)
module.exit_json(changed=changed, sudorule=sudorule)
- except Exception:
- e = get_exception()
- module.fail_json(msg=str(e))
+ except Exception as e:
+ module.fail_json(msg=to_native(e), exception=traceback.format_exc())
if __name__ == '__main__':
diff --git a/lib/ansible/modules/identity/ipa/ipa_user.py b/lib/ansible/modules/identity/ipa/ipa_user.py
index 8d6b997f3c..5a7bef17ea 100644
--- a/lib/ansible/modules/identity/ipa/ipa_user.py
+++ b/lib/ansible/modules/identity/ipa/ipa_user.py
@@ -1,19 +1,10 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+# Copyright: (c) 2017, Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.0',
'status': ['preview'],
@@ -143,10 +134,11 @@ user:
import base64
import hashlib
+import traceback
from ansible.module_utils.basic import AnsibleModule
-from ansible.module_utils.pycompat24 import get_exception
from ansible.module_utils.ipa import IPAClient
+from ansible.module_utils._text import to_native
class UserIPAClient(IPAClient):
@@ -328,9 +320,8 @@ def main():
password=module.params['ipa_pass'])
changed, user = ensure(module, client)
module.exit_json(changed=changed, user=user)
- except Exception:
- e = get_exception()
- module.fail_json(msg=str(e))
+ except Exception as e:
+ module.fail_json(msg=to_native(e), exception=traceback.format_exc())
if __name__ == '__main__':
diff --git a/lib/ansible/modules/identity/opendj/opendj_backendprop.py b/lib/ansible/modules/identity/opendj/opendj_backendprop.py
index 1bc8501471..4e88df8350 100644
--- a/lib/ansible/modules/identity/opendj/opendj_backendprop.py
+++ b/lib/ansible/modules/identity/opendj/opendj_backendprop.py
@@ -1,23 +1,11 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
+# Copyright: (c) 2016, Werner Dijkerman (ikben@werner-dijkerman.nl)
+# Copyright: (c) 2017, Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-# (c) 2016, Werner Dijkerman (ikben@werner-dijkerman.nl)
-#
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
-#
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.0',
'status': ['preview'],
@@ -97,6 +85,8 @@ EXAMPLES = '''
RETURN = '''
'''
+from ansible.module_utils.basic import AnsibleModule
+
class BackendProp(object):
@@ -209,8 +199,5 @@ def main():
else:
module.exit_json(changed=False)
-
-from ansible.module_utils.basic import AnsibleModule
-
if __name__ == '__main__':
main()