From 11606b85c86edc1f55fed29f9619ed700bfe152d Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Wed, 12 Mar 2014 15:36:18 -0400 Subject: [PATCH] sources_list help can take a filename now Signed-off-by: Alfredo Deza --- ceph_deploy/hosts/remotes.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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, -- 2.47.3