summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKim Hagen <kim.sidney@gmail.com>2018-07-02 12:07:55 +0200
committerKim Hagen <kim.sidney@gmail.com>2018-07-02 12:07:55 +0200
commit00d501404064ee548e96d67da70f17f08876a850 (patch)
tree1c33f24791408b6128800c67d9331842afeb9982 /src
parentf589232485ea72003b866093a6fbd4c8aac8f8f8 (diff)
parentf2316ef9c3173926193311ef04296920819e0d12 (diff)
downloadvyos-salt-minion-00d501404064ee548e96d67da70f17f08876a850.tar.gz
vyos-salt-minion-00d501404064ee548e96d67da70f17f08876a850.zip
Merge branch 'master' of github.com:UnicronNL/vyos-salt-minion
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/salt-minion.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/conf_mode/salt-minion.py b/src/conf_mode/salt-minion.py
index 1784bd6..4edb7a0 100755
--- a/src/conf_mode/salt-minion.py
+++ b/src/conf_mode/salt-minion.py
@@ -82,9 +82,13 @@ def get_config():
return salt
def generate(salt):
+ directory = '/config/salt/pki/minion'
if salt is None:
return None
+ if not os.path.exists(directory):
+ os.makedirs(directory)
+
tmpl = jinja2.Template(config_tmpl)
config_text = tmpl.render(salt)
with open(config_file, 'w') as f: