summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/templates/salt-minion/minion.j2 (renamed from data/templates/salt-minion/minion.tmpl)0
-rwxr-xr-xsrc/conf_mode/salt-minion.py7
2 files changed, 4 insertions, 3 deletions
diff --git a/data/templates/salt-minion/minion.tmpl b/data/templates/salt-minion/minion.j2
index 99749b57a..99749b57a 100644
--- a/data/templates/salt-minion/minion.tmpl
+++ b/data/templates/salt-minion/minion.j2
diff --git a/src/conf_mode/salt-minion.py b/src/conf_mode/salt-minion.py
index 841bf6a39..e8c1f6e54 100755
--- a/src/conf_mode/salt-minion.py
+++ b/src/conf_mode/salt-minion.py
@@ -85,7 +85,7 @@ def generate(salt):
if not salt:
return None
- render(config_file, 'salt-minion/minion.tmpl', salt,
+ render(config_file, 'salt-minion/minion.j2', salt,
user=salt['user'], group=salt['group'])
if not os.path.exists(master_keyfile):
@@ -105,13 +105,14 @@ def generate(salt):
return None
def apply(salt):
+ service_name = 'salt-minion.service'
if not salt:
# Salt removed from running config
- call('systemctl stop salt-minion.service')
+ call(f'systemctl stop {service_name}')
if os.path.exists(config_file):
os.unlink(config_file)
else:
- call('systemctl restart salt-minion.service')
+ call(f'systemctl restart {service_name}')
return None