def write_sources_list(url, codename, filename='ceph.list', mode=0644):
    repo_path = os.path.join('/etc/apt/sources.list.d', filename)
    content = 'deb {url} {codename} main\n'.format(
        url=url,
        codename=codename,
    )
    write_file(repo_path, content, mode)
add deb repo to /etc/apt/sources.list.d/
dataset/ETHPy150Open ceph/ceph-deploy/ceph_deploy/hosts/remotes.py/write_sources_list