d3268d05ec
Before the changes, removing a repository required a repo url. This shouldn't be required since zypper allows removing a repo based on its alias (mapped to name in this module). The name variable was always required, which is misleading since repofiles provide their own alias. So a runtime check was added to avoid this confusion. Additionaly, running this module on .repo files weren't idempotent. e.g Before: $ ./hacking/test-module -m library/packaging/zypper_repository -a "repo=http://download.opensuse.org/repositories/devel:/languages:/python/SLE_11_SP3/devel:languages:python.repo name=foo" {"repo": "http://download.opensuse.org/repositories/devel:/languages:/python/SLE_11_SP3/devel:languages:python.repo", "state": "present", "changed": true} $ ./hacking/test-module -m library/packaging/zypper_repository -a "repo=http://download.opensuse.org/repositories/devel:/languages:/python/SLE_11_SP3/devel:languages:python.repo name=foo" {"msg": "Repository named 'devel_languages_python' already exists. Please use another alias.\n", "failed": true} After: $ ./hacking/test-module -m library/packaging/zypper_repository -a "repo=http://download.opensuse.org/repositories/devel:/languages:/python/SLE_11_SP3/devel:languages:python.repo" {"repo": "http://download.opensuse.org/repositories/devel:/languages:/python/SLE_11_SP3/devel:languages:python.repo", "state": "present", "changed": true} $ ./hacking/test-module -m library/packaging/zypper_repository -a "repo=http://download.opensuse.org/repositories/devel:/languages:/python/SLE_11_SP3/devel:languages:python.repo" {"repo": "http://download.opensuse.org/repositories/devel:/languages:/python/SLE_11_SP3/devel:languages:python.repo", "state": "present", "changed": false} Signed-off-by: Hector Acosta <hector.acosta@gmail.com> |
||
---|---|---|
.. | ||
cloud | ||
commands | ||
database | ||
files | ||
internal | ||
inventory | ||
messaging | ||
monitoring | ||
net_infrastructure | ||
network | ||
notification | ||
packaging | ||
source_control | ||
system | ||
utilities | ||
web_infrastructure | ||
windows |