From 5cb2fff73b1e5613c4b56d1ecfc822360c15f88c Mon Sep 17 00:00:00 2001 From: Vasu Kulkarni Date: Thu, 19 Oct 2017 10:34:19 -0700 Subject: [PATCH] remove dependency packages the task added from testnode Signed-off-by: Vasu Kulkarni F Signed-off-by: Vasu Kulkarni --- teuthology/task/ceph_ansible.py | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/teuthology/task/ceph_ansible.py b/teuthology/task/ceph_ansible.py index fe7919cbd9..dd5a04996e 100644 --- a/teuthology/task/ceph_ansible.py +++ b/teuthology/task/ceph_ansible.py @@ -217,6 +217,42 @@ class CephAnsible(Task): run.Raw(str_args) ] ) + # cleanup the ansible ppa repository we added + # and also remove the dependency pkgs we installed + if installer_node.os.package_type == 'deb': + installer_node.run(args=[ + 'sudo', + 'add-apt-repository', + '--remove', + run.Raw('ppa:ansible/ansible'), + ]) + installer_node.run(args=[ + 'sudo', + 'apt-get', + 'update', + ]) + installer_node.run(args=[ + 'sudo', + 'apt-get', + 'remove', + '-y', + 'ansible', + 'libssl-dev', + 'libffi-dev', + 'python-dev' + ]) + else: + # cleanup rpm packages the task installed + installer_node.run(args=[ + 'sudo', + 'yum', + 'remove', + '-y', + 'libffi-devel', + 'python-devel', + 'openssl-devel', + 'libselinux-python' + ]) def collect_logs(self): ctx = self.ctx -- 2.39.5