Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • v1.14.6
  • v1.14.5
  • v1.14.4
  • v1.14.3
  • v1.14.2
  • v1.14.1
  • v1.14.0
  • v1.13.2
  • v1.13.1
  • v1.13.0
  • v1.12.1
  • v1.12.0
  • v1.11.1
  • v1.11.0
  • v1.10.0
  • v1.9.2
  • v1.9.1
  • v1.9.0
  • v1.8.4
  • v1.8.3
21 results

ansible_ipa_server.py

Blame
    • Thomas Woerner's avatar
      446107f1
      ansible_ipa_server: Fix ansible-test fake execution test findings · 446107f1
      Thomas Woerner authored
      All imports that are only available after installing IPA need to be in a
      try exception clause to be able to pass the fake execution test. The old
      workaround "if 'ansible.executor' in sys.modules:" is not working with
      this test anymore.
      
      If the imports can not be done, all used and needed attributes are
      defines with the value None.
      
      The new function check_imports has been added to fail with module.fail_json
      if an import exception occured and ANSIBLE_IPA_SERVER_MODULE_IMPORT_ERROR is
      not None. This function needs to be called in all modules.
      
      The `copyright` date is extended with `-2022`.
      446107f1
      History
      ansible_ipa_server: Fix ansible-test fake execution test findings
      Thomas Woerner authored
      All imports that are only available after installing IPA need to be in a
      try exception clause to be able to pass the fake execution test. The old
      workaround "if 'ansible.executor' in sys.modules:" is not working with
      this test anymore.
      
      If the imports can not be done, all used and needed attributes are
      defines with the value None.
      
      The new function check_imports has been added to fail with module.fail_json
      if an import exception occured and ANSIBLE_IPA_SERVER_MODULE_IMPORT_ERROR is
      not None. This function needs to be called in all modules.
      
      The `copyright` date is extended with `-2022`.