check for ubuntu distribution first
This commit is contained in:
parent
26e2447b94
commit
858b3da2ae
1 changed files with 3 additions and 3 deletions
|
@ -349,11 +349,11 @@ def main():
|
||||||
update_cache = module.params['update_cache']
|
update_cache = module.params['update_cache']
|
||||||
sourceslist = None
|
sourceslist = None
|
||||||
|
|
||||||
if isinstance(distro, aptsources.distro.DebianDistribution) or \
|
if isinstance(distro, aptsources.distro.UbuntuDistribution):
|
||||||
|
sourceslist = UbuntuSourcesList(add_ppa_signing_keys_callback=get_add_ppa_signing_key_callback(module))
|
||||||
|
elif isinstance(distro, aptsources.distro.DebianDistribution) or \
|
||||||
isinstance(distro, aptsources.distro.Distribution):
|
isinstance(distro, aptsources.distro.Distribution):
|
||||||
sourceslist = SourcesList()
|
sourceslist = SourcesList()
|
||||||
elif isinstance(distro, aptsources.distro.UbuntuDistribution):
|
|
||||||
sourceslist = UbuntuSourcesList(add_ppa_signing_keys_callback=get_add_ppa_signing_key_callback(module))
|
|
||||||
else:
|
else:
|
||||||
module.fail_json(msg='Module apt_repository supports only Debian and Ubuntu.')
|
module.fail_json(msg='Module apt_repository supports only Debian and Ubuntu.')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue