Commit e329c2be authored by Dimitris Aragiorgis's avatar Dimitris Aragiorgis

deploy: Create the ddns and .ssh dirs

These dirs are needed to store the ddns and .ssh files created by
snf-deploy keygen. All these files should reside in the template dir
since are going to be moved to target nodes.

Add those dirs in .gitignore since we don't want to track any temp
files created if we run snf-deploy from source.

Update Copyright dates.
Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
parent 9583e0bc
......@@ -41,5 +41,8 @@ astakosclient/astakosclient/version.py
snf-django-lib/snf_django/version.py
snf-branding/synnefo_branding/version.py
snf-deploy/snfdeploy/version.py
# Temp dirs generated by snf-deploy keygen
snf-deploy/files/root/.ssh
snf-deploy/files/root/ddns
*.egg
*.tar.gz
# Copyright (C) 2010, 2011, 2012, 2013 GRNET S.A. All rights reserved.
# Copyright (C) 2013, 2014 GRNET S.A. All rights reserved.
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the following
......@@ -513,6 +513,9 @@ def must_create_keys(env):
def do_create_keys(args, env):
d = os.path.join(env.templates, "root/.ssh")
# Create dir if it does not exist
if not os.path.exists(d):
os.makedirs(d)
a = os.path.join(d, "authorized_keys")
# Delete old keys
for filename in os.listdir(d):
......@@ -528,6 +531,9 @@ def do_create_keys(args, env):
def must_create_ddns_keys(env):
d = os.path.join(env.templates, "root/ddns")
# Create dir if it does not exist
if not os.path.exists(d):
os.makedirs(d)
key_exists = glob.glob(os.path.join(d, "Kddns*key"))
private_exists = glob.glob(os.path.join(d, "Kddns*private"))
bind_key_exists = os.path.exists(os.path.join(d, "ddns.key"))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment