From 2fde14aaf1bd29103f7e4a083e9cf4d820d27183 Mon Sep 17 00:00:00 2001 From: Maciej Delmanowski Date: Sat, 25 Jul 2015 18:11:52 +0200 Subject: [PATCH] Remove separate check for Xen Module checked for Xen-based system, however since 'xen:///' URI support exists in 'libvirt', we should use it explicitly instead. --- lib/ansible/modules/extras/cloud/misc/virt_net.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/ansible/modules/extras/cloud/misc/virt_net.py b/lib/ansible/modules/extras/cloud/misc/virt_net.py index b84f976c6f..cd579a3f78 100644 --- a/lib/ansible/modules/extras/cloud/misc/virt_net.py +++ b/lib/ansible/modules/extras/cloud/misc/virt_net.py @@ -164,13 +164,7 @@ class LibvirtConnection(object): self.module = module - cmd = "uname -r" - rc, stdout, stderr = self.module.run_command(cmd) - - if "xen" in stdout: - conn = libvirt.open(None) - else: - conn = libvirt.open(uri) + conn = libvirt.open(uri) if not conn: raise Exception("hypervisor connection failure")