From da2cd8aca2eb0327c0fd126b4535d6de3aefd563 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 4 Oct 2019 12:39:16 -0500 Subject: [PATCH] ceph-daemon: add --output-pub-ssh-key for bootstrap Signed-off-by: Sage Weil --- src/ceph-daemon | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ceph-daemon b/src/ceph-daemon index 528d61380b154..b9b3504e2a5b8 100755 --- a/src/ceph-daemon +++ b/src/ceph-daemon @@ -662,6 +662,11 @@ def command_bootstrap(): tmp_pub.write(ssh_pub) tmp_pub.flush() + if args.output_pub_ssh_key: + with open(args.output_put_ssh_key, 'w') as f: + f.write(ssh_pub) + logging.info('Wrote public SSH key to to %s' % args.output_pub_ssh_key) + CephContainer( image=args.image, entrypoint='/usr/bin/ceph', @@ -1215,6 +1220,9 @@ parser_bootstrap.add_argument( parser_bootstrap.add_argument( '--output-config', help='location to write conf file to connect to new cluster') +parser_bootstrap.add_argument( + '--output-pub-ssh-key', + help='location to write the cluster\'s public SSH key') parser_bootstrap.add_argument( '--skip-ssh', action='store_true', -- 2.39.5