Merge pull request 'pkgs/cli: Add --password flag to machines install' (#2499) from kenji/clan-core:kenji-add-password-flag into main
This commit is contained in:
@@ -148,6 +148,9 @@ def install_command(args: argparse.Namespace) -> None:
|
|||||||
target_host = str(machine.target_host)
|
target_host = str(machine.target_host)
|
||||||
password = None
|
password = None
|
||||||
|
|
||||||
|
if args.password:
|
||||||
|
password = args.password
|
||||||
|
|
||||||
if not target_host:
|
if not target_host:
|
||||||
msg = "No target host provided, please provide a target host."
|
msg = "No target host provided, please provide a target host."
|
||||||
raise ClanError(msg)
|
raise ClanError(msg)
|
||||||
@@ -240,6 +243,10 @@ def register_install_parser(parser: argparse.ArgumentParser) -> None:
|
|||||||
help="ssh address to install to in the form of user@host:2222",
|
help="ssh address to install to in the form of user@host:2222",
|
||||||
)
|
)
|
||||||
add_dynamic_completer(target_host_parser, complete_target_host)
|
add_dynamic_completer(target_host_parser, complete_target_host)
|
||||||
|
parser.add_argument(
|
||||||
|
"--password",
|
||||||
|
help="specify the password for the ssh connection (generated by starting the clan installer)",
|
||||||
|
)
|
||||||
group.add_argument(
|
group.add_argument(
|
||||||
"-P",
|
"-P",
|
||||||
"--png",
|
"--png",
|
||||||
|
|||||||
Reference in New Issue
Block a user