summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2018-05-17 18:40:41 +0300
committerLars Wirzenius <liw@liw.fi>2018-05-17 18:40:41 +0300
commite061a0cea406599ef5245fc8bbf1d0b0f66ceeba (patch)
tree645dfb09d90e5cd13b35db4bdc6bac3859e6fb60
parent5c27e37e753fc735e87bca1948ed6085c248d910 (diff)
downloadhetznertool-e061a0cea406599ef5245fc8bbf1d0b0f66ceeba.tar.gz
Change: get --ssh-key value from config if given there
-rwxr-xr-xhetznertool3
1 files changed, 2 insertions, 1 deletions
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')