summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUnicronNL <kim.sidney@gmail.com>2018-07-01 23:14:59 +0200
committerUnicronNL <kim.sidney@gmail.com>2018-07-01 23:14:59 +0200
commitf2316ef9c3173926193311ef04296920819e0d12 (patch)
tree108dbaf85aca44826c10af5ca65b363030edcd77
parent48596dcce9e431e448eb8684dc55d922bf7fa2c9 (diff)
downloadvyos-salt-minion-f2316ef9c3173926193311ef04296920819e0d12.tar.gz
vyos-salt-minion-f2316ef9c3173926193311ef04296920819e0d12.zip
create pki dir
-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: