2
0

chore(pr): adopt pr comments; indent jinja

This commit is contained in:
N 2020-06-13 21:11:28 +01:00
parent 419352f6ce
commit 8875b93eb7
2 changed files with 66 additions and 64 deletions

View File

@ -11,7 +11,7 @@ include:
salt-master-macos:
file.managed:
- name: /Library/LaunchDaemons/com.saltstack.salt.master.plist
- source: https://raw.githubusercontent.com/saltstack/salt/master/pkg/darwin/com.saltstack.salt.master.plist
- source: https://raw.githubusercontent.com/saltstack/salt/master/pkg/osx/scripts/com.saltstack.salt.master.plist
- source_hash: {{ salt_settings.salt_master_macos_plist_hash }}
- retry:
attempts: 2
@ -61,6 +61,7 @@ salt-master:
- enable: {{ salt_settings.master_service_details.enabled }}
- name: {{ salt_settings.master_service }}
- watch:
- file: salt-master-macos
- file: salt-master
- file: remove-old-master-conf-file
{% endif %}

View File

@ -42,7 +42,7 @@ salt-minion-macos:
file.managed:
- onlyif: {{ grains.os == 'MacOS' }}
- name: /Library/LaunchDaemons/com.saltstack.salt.minion.plist
- source: https://raw.githubusercontent.com/saltstack/salt/master/pkg/darwin/com.saltstack.salt.minion.plist
- source: https://raw.githubusercontent.com/saltstack/salt/master/pkg/osx/scripts/com.saltstack.salt.master.plist
- source_hash: {{ salt_settings.salt_minion_macos_plist_hash }}
- retry:
attempts: 2
@ -66,9 +66,8 @@ salt-minion:
macpackage.installed:
- name: '/tmp/salt.pkg'
- target: /
{# macpackage.installed behaves weirdly with version_check, detects diff but fails to complete install. #}
{# use force == True as workaround #}
- force: True
{# macpackage.installed is weird with version_check, detects diff but incomplete install #}
- force: True {# workaround #}
- unless:
- test -n "{{ salt_settings.version }}" && '/opt/salt/bin/salt-minion --version=.*{{ salt_settings.version }}.*'
{% if salt_settings.minion_service_details.state != 'ignore' %}
@ -109,8 +108,10 @@ salt-minion:
service.{{ salt_settings.minion_service_details.state }}:
- enable: {{ salt_settings.minion_service_details.enabled }}
- name: {{ salt_settings.minion_service }}
- require:
- file: salt-minion
- watch:
- file: salt-master-macos
- file: salt-master
- file: remove-old-minion-conf-file
{% endif %}
{%- if not salt_settings.restart_via_at %}
cmd.run: