Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows restart command is wrong #337

Closed
dafyddj opened this issue Oct 13, 2017 · 0 comments
Closed

Windows restart command is wrong #337

dafyddj opened this issue Oct 13, 2017 · 0 comments

Comments

@dafyddj
Copy link
Contributor

dafyddj commented Oct 13, 2017

cmd.run:
{%- if grains['saltversioninfo'][0] >= 2016 and grains['saltversioninfo'][1] >= 3 %}
{%- if grains['kernel'] == 'Windows' %}
- name: '{{ salt_settings.config_path }}\salt-call.bat --local service.restart {{ salt_settings.minion_service }}'
{%- else %}
- name: 'salt-call --local service.restart {{ salt_settings.minion_service }} --out-file /dev/null'
- bg: True
{%- endif %}
{%- else %}

salt-call.bat (line 25) does not reside in the config_path, but rather in c:\salt.

What's the best fix?

  • use a relative path {{ salt_settings.config_path }}\..\salt-call.bat, although I think there are some plans to install to Program Files and put config elsewhere?
  • add a new jinja variable exe_path or something for c:\salt
  • or, since 2016.11 (I believe) c:\salt has been added to the system path, so salt-call.bat can be called without a path

Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant