0
0
mirror of https://github.com/saltstack-formulas/salt-formula.git synced 2024-11-27 22:38:10 +01:00

Merge pull request #319 from genuss/restart_via_at

Add restart minion via at (fixes #136)
This commit is contained in:
Niels Abspoel 2017-07-26 21:45:25 +02:00 committed by GitHub
commit 9cf5cd2c00
2 changed files with 21 additions and 2 deletions

View File

@ -4,6 +4,7 @@ salt:
install_packages: True
use_pip: False
clean_config_d_dir: True
restart_via_at: False
config_path: /etc/salt

View File

@ -16,12 +16,30 @@ salt-minion:
service.running:
- enable: True
- name: {{ salt_settings.minion_service }}
{%- if not salt_settings.restart_via_at %}
- watch:
{% if salt_settings.install_packages %}
{%- if salt_settings.install_packages %}
- pkg: salt-minion
{% endif %}
{%- endif %}
- file: salt-minion
- file: remove-old-minion-conf-file
{%- else %}
at:
pkg.installed: []
restart-salt-minion:
cmd.wait:
- name: echo salt-call --local service.restart salt-minion | at now + 1 minute
- order: last
- require:
- pkg: at
- watch:
{%- if salt_settings.install_packages %}
- pkg: salt-minion
{%- endif %}
- file: salt-minion
- file: remove-old-minion-conf-file
{%- endif %}
{% if salt_settings.minion_remove_config %}
remove-default-minion-conf-file: