From: Alfredo Deza Date: Wed, 12 Mar 2014 19:36:18 +0000 (-0400) Subject: sources_list help can take a filename now X-Git-Tag: v1.4.0~5^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=11606b85c86edc1f55fed29f9619ed700bfe152d;p=ceph-deploy.git sources_list help can take a filename now Signed-off-by: Alfredo Deza --- diff --git a/ceph_deploy/hosts/remotes.py b/ceph_deploy/hosts/remotes.py index 7a4f5c6..2c89e8f 100644 --- a/ceph_deploy/hosts/remotes.py +++ b/ceph_deploy/hosts/remotes.py @@ -40,9 +40,10 @@ def machine_type(): return platform.machine() -def write_sources_list(url, codename): - """add ceph deb repo to sources.list""" - with file('/etc/apt/sources.list.d/ceph.list', 'w') as f: +def write_sources_list(url, codename, filename='ceph.list'): + """add deb repo to sources.list""" + repo_path = os.path.join('/etc/apt/sources.list.d', filename) + with file(repo_path, 'w') as f: f.write('deb {url} {codename} main\n'.format( url=url, codename=codename,