Repository: ansible/ansible-modules-extras

Issue:
zypper_repository: ImportError: No module named xml.dom.minidom
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME

zypper_repository module
##### ANSIBLE VERSION

```
ansible 2.1.1.0
  config file = /home/szollinx/git/otc_infrastructure_ansible-configs/ansible.cfg
  configured module search path = Default w/o overrides
```
##### CONFIGURATION

[defaults]
hostfile = hosts
forks = 50
retry_files_enabled = True
retry_files_save_path = .

[ssh_connection]
pipelining = True
##### OS / ENVIRONMENT

NAME="Ubuntu"
VERSION="16.04.1 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.1 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
UBUNTU_CODENAME=xenial.
##### SUMMARY

When running zypper_module, it will always result in an error of ImportError: No module named xml.dom.minidom which causes multiple errors
##### STEPS TO REPRODUCE

```
zypper_repository: name=oss repo=http://suse.mobile-central.org/distribution/leap/42.1/repo/oss state=present disable_gpg_check=no overwrite_multiple=yes
```
##### EXPECTED RESULTS

Add the new repository
##### ACTUAL RESULTS

<!--- What actually happened? If possible run with high verbosity (-vvvv) -->

<!--- Paste verbatim command output between quotes below -->

```
An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
  File "/tmp/ansible__JWxsm/ansible_module_zypper_repository.py", line 329, in <module>
    main()
  File "/tmp/ansible__JWxsm/ansible_module_zypper_repository.py", line 311, in main
    exists, mod, old_repos = repo_exists(module, repodata, overwrite_multiple)
  File "/tmp/ansible__JWxsm/ansible_module_zypper_repository.py", line 147, in repo_exists
    existing_repos = _parse_repos(module)
  File "/tmp/ansible__JWxsm/ansible_module_zypper_repository.py", line 106, in _parse_repos
    from xml.dom.minidom import parseString as parseXML
ImportError: No module named xml.dom.minidom

fatal: [**FQDN omitted**]: FAILED! => {"changed": false, "failed": true, "invocation": {"module_name": "zypper_repository"}, "module_stderr": "Traceback (most recent call last):\n  File \"/tmp/ansible__JWxsm/ansible_module_zypper_repository.py\", line 329, in <module>\n    main()\n  File \"/tmp/ansible__JWxsm/ansible_module_zypper_repository.py\", line 311, in main\n    exists, mod, old_repos = repo_exists(module, repodata, overwrite_multiple)\n  File \"/tmp/ansible__JWxsm/ansible_module_zypper_repository.py\", line 147, in repo_exists\n    existing_repos = _parse_repos(module)\n  File \"/tmp/ansible__JWxsm/ansible_module_zypper_repository.py\", line 106, in _parse_repos\n    from xml.dom.minidom import parseString as parseXML\nImportError: No module named xml.dom.minidom\n", "module_stdout": "", "msg": "MODULE FAILURE", "parsed": false}
```



Discussion:
<!-- @szollinx: Thanks for filing this bug report! -->

@matze ping, this issue is waiting for your response.
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)

<!--- boilerplate: issue_bug_new --->


Resolving patch:
diff --git a/packaging/os/zypper.py b/packaging/os/zypper.py
--- a/packaging/os/zypper.py
+++ b/packaging/os/zypper.py
@@ -107,6 +107,7 @@
 # informational: requirements for nodes
 requirements:
     - "zypper >= 1.0  # included in openSuSE >= 11.1 or SuSE Linux Enterprise Server/Desktop >= 11.0"
+    - python-xml
     - rpm
 '''
 
diff --git a/packaging/os/zypper_repository.py b/packaging/os/zypper_repository.py
--- a/packaging/os/zypper_repository.py
+++ b/packaging/os/zypper_repository.py
@@ -103,6 +103,7 @@
 
 requirements: 
     - "zypper >= 1.0  # included in openSuSE >= 11.1 or SuSE Linux Enterprise Server/Desktop >= 11.0"
+    - python-xml
 '''
 
 EXAMPLES = '''


Test patch: