From e061a0cea406599ef5245fc8bbf1d0b0f66ceeba Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 17 May 2018 18:40:41 +0300 Subject: Change: get --ssh-key value from config if given there --- hetznertool | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hetznertool b/hetznertool index 60a3c08..dc75e91 100755 --- a/hetznertool +++ b/hetznertool @@ -200,7 +200,8 @@ def create_parser(config): create.add_argument( '--ssh-key', metavar='KEYNAME', - required=True, + required='ssh-key' not in config, + default=config['ssh-key'], help='create VM so it allow login via ssh key uploaded as KEYNAME') create.add_argument( 'context', help='hcloud context to create VMs in') -- cgit v1.2.1