refactor(retry_options): provide options from defaults/pillar

This commit is contained in:
Imran Iqbal
2021-03-30 12:40:40 +01:00
parent e31a56e7a3
commit bbd7286240
55 changed files with 272 additions and 15 deletions
+7
View File
@@ -85,6 +85,13 @@ salt:
profiles: salt://salt/files/cloud.profiles.d
maps: salt://salt/files/cloud.maps.d
# https://docs.saltstack.com/en/latest/ref/states/requisites.html#retrying-states
retry_options:
attempts: 2
until: true
interval: 10
splay: 10
salt_formulas:
list: {} # via pillar data
checkout_orig_branch: false
+1 -5
View File
@@ -15,11 +15,7 @@ salt-master-macos:
- name: /Library/LaunchDaemons/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
until: True
interval: 10
splay: 10
- retry: {{ salt_settings.retry_options | json }}
- require_in:
- service: salt-master
{%- endif %}
+2 -10
View File
@@ -27,11 +27,7 @@ download-salt-minion:
- test -n "{{ salt_settings.version }}" && '/opt/salt/bin/salt-minion --version=.*{{ salt_settings.version }}.*'
- require_in:
- macpackage: salt-minion
- retry:
attempts: 2
until: True
interval: 10
splay: 10
- retry: {{ salt_settings.retry_options | json }}
{%- elif "workaround https://github.com/saltstack/salt/issues/49348" %}
cmd.run:
- name: /usr/local/bin/brew install {{ salt_settings.salt_minion }}
@@ -45,11 +41,7 @@ salt-minion-macos:
- name: /Library/LaunchDaemons/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
until: True
interval: 10
splay: 10
- retry: {{ salt_settings.retry_options | json }}
- require_in:
- service: salt-minion
- watch_in: