This commit is contained in:
ahmadbilalkhalid 2019-08-30 06:23:45 +05:00
commit a9f8d245b9
10 changed files with 127 additions and 83 deletions

View file

@ -2,6 +2,7 @@ import click
import os
import subprocess
@click.group()
def ceph():
pass
@ -21,7 +22,7 @@ def setup(ceph_url, ssh_username):
keys = "\n".join(keys)
with open(os.path.expanduser("~/.ssh/known_hosts"), "a") as known_hosts:
known_hosts.write(keys)
os.makedirs("/etc/ceph", exist_ok=True)
command = f"sftp -b ./ceph_batch_cmd {ssh_username}@{ceph_url}:/etc/ceph"
subprocess.check_output(command.split())
subprocess.check_output(command.split())