summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-04-15 19:42:06 +0200
committerChristian Poessinger <christian@poessinger.com>2022-04-15 19:58:53 +0200
commit96a9ebc6a06a50ff652338a67043ec747cbdd44a (patch)
treef1aad73dc3c1d5385c6cb875d91f875a0d81fd9c /src/conf_mode
parente5cdb9d8e2dd803f238001773d31c05ef7874117 (diff)
downloadvyos-1x-96a9ebc6a06a50ff652338a67043ec747cbdd44a.tar.gz
vyos-1x-96a9ebc6a06a50ff652338a67043ec747cbdd44a.zip
salt-minion: T4353: fix Jinja2 linting errors
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/salt-minion.py7
1 files changed, 4 insertions, 3 deletions
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