]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-daemon: add --output-pub-ssh-key for bootstrap
authorSage Weil <sage@redhat.com>
Fri, 4 Oct 2019 17:39:16 +0000 (12:39 -0500)
committerSage Weil <sage@redhat.com>
Sat, 5 Oct 2019 19:28:50 +0000 (14:28 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/ceph-daemon

index 528d61380b154f2e76856b09ae915450dd49b4cc..b9b3504e2a5b8cb50beecfa0187ffc0a717d57d5 100755 (executable)
@@ -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',