fix(sysrc-svc): workaround *BSD minion indefinitely hanging on start

Check https://github.com/saltstack/salt/issues/44848 for further details
This commit is contained in:
sam
2019-04-29 12:20:00 +11:00
committed by sticky-note
parent 29cd2d8a7c
commit 0aa8b4a048
6 changed files with 41 additions and 15 deletions

View File

@@ -24,11 +24,11 @@ postgresql-start:
postgresql-enable:
cmd.run:
{%- if salt['file.file_exists']('/bin/systemctl') %}
- name: systemctl enable {{ postgres.service }}
- name: systemctl enable {{ postgres.service.name }}
{%- elif salt['cmd.which']('chkconfig') %}
- name: chkconfig {{ postgres.service }} on
- name: chkconfig {{ postgres.service.name }} on
{%- elif salt['file.file_exists']('/usr/sbin/update-rc.d') %}
- name: update-rc.d {{ service }} defaults
- name: update-rc.d {{ postgres.service.name }} defaults
{%- else %}
# Nothing to do
- name: 'true'