From: Sage Weil Date: Sun, 15 Mar 2020 15:18:41 +0000 (-0500) Subject: cephadm: bootstrap: allow --output-dir X-Git-Tag: v15.2.0~43^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fc101d8fb03f097cc6063032e28c7d873d6809a4;p=ceph.git cephadm: bootstrap: allow --output-dir This is easier than specifying each of output-config, output-keyring, and output-pub-ssh-key. Signed-off-by: Sage Weil --- diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index f89daff60fa1..29810df218e7 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -1973,6 +1973,14 @@ def command_inspect_image(): def command_bootstrap(): # type: () -> int + if not args.output_config: + args.output_config = os.path.join(args.output_dir, 'ceph.conf') + if not args.output_keyring: + args.output_keyring = os.path.join(args.output_dir, + 'ceph.client.admin.keyring') + if not args.output_pub_ssh_key: + args.output_pub_ssh_key = os.path.join(args.output_dir, 'ceph.pub') + # verify output files for f in [args.output_config, args.output_keyring, args.output_pub_ssh_key]: if not args.allow_overwrite: @@ -3872,17 +3880,18 @@ def _get_parser(): parser_bootstrap.add_argument( '--fsid', help='cluster FSID') + parser_bootstrap.add_argument( + '--output-dir', + default='/etc/ceph', + help='directory to write config, keyring, and pub key files') parser_bootstrap.add_argument( '--output-keyring', - default='/etc/ceph/ceph.client.admin.keyring', help='location to write keyring file with new cluster admin and mon keys') parser_bootstrap.add_argument( '--output-config', - default='/etc/ceph/ceph.conf', help='location to write conf file to connect to new cluster') parser_bootstrap.add_argument( '--output-pub-ssh-key', - default='/etc/ceph/ceph.pub', help='location to write the cluster\'s public SSH key') parser_bootstrap.add_argument( '--skip-ssh',