Skip to content

Commit

Permalink
Merge pull request ceph#1120 from ceph/wip-ansible-purge-fixc
Browse files Browse the repository at this point in the history
update ansible package from ansible PPA
  • Loading branch information
zmc authored Oct 20, 2017
2 parents 42f8c1e + 5cb2fff commit 34c8274
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions teuthology/task/ceph_ansible.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,42 @@ def teardown(self):
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
Expand Down Expand Up @@ -316,11 +352,23 @@ def run_playbook(self):
'libselinux-python'
])
else:
# update ansible from ppa
ceph_installer.run(args=[
'sudo',
'add-apt-repository',
run.Raw('ppa:ansible/ansible'),
])
ceph_installer.run(args=[
'sudo',
'apt-get',
'update',
])
ceph_installer.run(args=[
'sudo',
'apt-get',
'install',
'-y',
'ansible',
'libssl-dev',
'python-openssl',
'libffi-dev',
Expand Down

0 comments on commit 34c8274

Please sign in to comment.