]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
remove dependency packages the task added from testnode 1120/head
authorVasu Kulkarni <vasu@redhat.com>
Thu, 19 Oct 2017 17:34:19 +0000 (10:34 -0700)
committerVasu Kulkarni <vasu@redhat.com>
Thu, 19 Oct 2017 18:23:30 +0000 (11:23 -0700)
Signed-off-by: Vasu Kulkarni <vasu@redhat.com>
F

Signed-off-by: Vasu Kulkarni <vasu@redhat.com>
teuthology/task/ceph_ansible.py

index fe7919cbd94b8ff21c4c713c92a905179d7ffc7c..dd5a04996e69b7fd30096d882edc852b0939acf5 100644 (file)
@@ -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