a
This commit is contained in:
parent
b889dfadb4
commit
fcd7e9220b
1 changed files with 2 additions and 2 deletions
|
@ -12,10 +12,10 @@ def ceph():
|
|||
@click.option("--ssh_username", required=True)
|
||||
def setup(ceph_url, ssh_username):
|
||||
ssh_key = ""
|
||||
with open("~/.ssh/id_rsa.pub") as pubkey:
|
||||
with open(os.path.expanduser("~/.ssh/id_rsa.pub")) as pubkey:
|
||||
ssh_key = pubkey.read()
|
||||
|
||||
with open("~/.ssh/known_hosts", "a") as known_hosts:
|
||||
with open(os.path.expanduser("~/.ssh/known_hosts"), "a") as known_hosts:
|
||||
known_hosts.write(f"{ceph_url} {ssh_key}")
|
||||
|
||||
os.makedirs("/etc/ceph", exist_ok=True)
|
||||
|
|
Loading…
Reference in a new issue