diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-04-15 19:42:06 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-04-15 19:58:53 +0200 |
commit | 96a9ebc6a06a50ff652338a67043ec747cbdd44a (patch) | |
tree | f1aad73dc3c1d5385c6cb875d91f875a0d81fd9c /src/conf_mode | |
parent | e5cdb9d8e2dd803f238001773d31c05ef7874117 (diff) | |
download | vyos-1x-96a9ebc6a06a50ff652338a67043ec747cbdd44a.tar.gz vyos-1x-96a9ebc6a06a50ff652338a67043ec747cbdd44a.zip |
salt-minion: T4353: fix Jinja2 linting errors
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-x | src/conf_mode/salt-minion.py | 7 |
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 |