From 5f9847d10a4d3d0335392e54415081ee3d9bf417 Mon Sep 17 00:00:00 2001 From: Bruno Goncalves Date: May 25 2018 09:14:19 +0000 Subject: inventory should not install packages needed by role --- diff --git a/inventory/standard-inventory-docker b/inventory/standard-inventory-docker index 4b9e3ba..1aa2aa9 100755 --- a/inventory/standard-inventory-docker +++ b/inventory/standard-inventory-docker @@ -151,25 +151,6 @@ def inv_host(image, docker_extra_args): sys.stderr.write("ERROR: Could not set ansible_python_interpreter") return None - python2_deps = ["python2-dnf", "libselinux-python"] - python3_deps = ["python3-dnf", "python3-libselinux"] - - # Now install the necessary stuff in the container :S - install = [ - "/usr/bin/docker", "exec", "--user=root", name, "/usr/bin/yum", "-y", "install" - ] - if ansible_python_interpreter == "/usr/bin/python2": - install.extend(python2_deps) - if ansible_python_interpreter == "/usr/bin/python3": - install.extend(python3_deps) - try: - subprocess.check_call(install, stdout=sys.stderr.fileno()) - except subprocess.CalledProcessError: - # Could not install necessary packages to run the tests. - # Need to stop and remove the container. - subprocess.call(["/usr/bin/docker", "rm", "-f", name], stdout=null) - raise RuntimeError("Could not install Ansible dependencies in launched container") - # Directory to place artifacts artifacts = os.environ.get("TEST_ARTIFACTS", os.path.join(os.getcwd(), "artifacts"))