2
0

refactor(retry_options): provide options from defaults/pillar

This commit is contained in:
Imran Iqbal 2021-03-26 17:59:40 +00:00
parent e31a56e7a3
commit bbd7286240
No known key found for this signature in database
GPG Key ID: 6D8629439D2B7819
55 changed files with 272 additions and 15 deletions

View File

@ -369,6 +369,13 @@ salt:
- 'deploy': - 'deploy':
- /srv/salt/reactors/deploy.sls - /srv/salt/reactors/deploy.sls
# https://docs.saltstack.com/en/latest/ref/states/requisites.html#retrying-states
retry_options:
attempts: 2
until: true
interval: 10
splay: 10
salt_cloud_certs: salt_cloud_certs:
aws: aws:
pem: | pem: |

View File

@ -85,6 +85,13 @@ salt:
profiles: salt://salt/files/cloud.profiles.d profiles: salt://salt/files/cloud.profiles.d
maps: salt://salt/files/cloud.maps.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: salt_formulas:
list: {} # via pillar data list: {} # via pillar data
checkout_orig_branch: false checkout_orig_branch: false

View File

@ -15,11 +15,7 @@ salt-master-macos:
- name: /Library/LaunchDaemons/com.saltstack.salt.master.plist - 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: https://raw.githubusercontent.com/saltstack/salt/master/pkg/osx/scripts/com.saltstack.salt.master.plist
- source_hash: {{ salt_settings.salt_master_macos_plist_hash }} - source_hash: {{ salt_settings.salt_master_macos_plist_hash }}
- retry: - retry: {{ salt_settings.retry_options | json }}
attempts: 2
until: True
interval: 10
splay: 10
- require_in: - require_in:
- service: salt-master - service: salt-master
{%- endif %} {%- endif %}

View File

@ -27,11 +27,7 @@ download-salt-minion:
- test -n "{{ salt_settings.version }}" && '/opt/salt/bin/salt-minion --version=.*{{ salt_settings.version }}.*' - test -n "{{ salt_settings.version }}" && '/opt/salt/bin/salt-minion --version=.*{{ salt_settings.version }}.*'
- require_in: - require_in:
- macpackage: salt-minion - macpackage: salt-minion
- retry: - retry: {{ salt_settings.retry_options | json }}
attempts: 2
until: True
interval: 10
splay: 10
{%- elif "workaround https://github.com/saltstack/salt/issues/49348" %} {%- elif "workaround https://github.com/saltstack/salt/issues/49348" %}
cmd.run: cmd.run:
- name: /usr/local/bin/brew install {{ salt_settings.salt_minion }} - 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 - 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: https://raw.githubusercontent.com/saltstack/salt/master/pkg/osx/scripts/com.saltstack.salt.master.plist
- source_hash: {{ salt_settings.salt_minion_macos_plist_hash }} - source_hash: {{ salt_settings.salt_minion_macos_plist_hash }}
- retry: - retry: {{ salt_settings.retry_options | json }}
attempts: 2
until: True
interval: 10
splay: 10
- require_in: - require_in:
- service: salt-minion - service: salt-minion
- watch_in: - watch_in:

View File

@ -94,6 +94,11 @@ values:
python_git: python-git python_git: python-git
release: '3000' release: '3000'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: python-git python_git: python-git
release: '3000' release: '3000'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython python_git: GitPython
release: '3000' release: '3000'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython python_git: GitPython
release: '3000' release: '3000'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython python_git: GitPython
release: '3000' release: '3000'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -93,6 +93,11 @@ values:
python_git: python-git python_git: python-git
release: '3000' release: '3000'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -93,6 +93,11 @@ values:
python_git: python-git python_git: python-git
release: '3000' release: '3000'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -91,6 +91,11 @@ values:
python_git: python-git python_git: python-git
release: '3000' release: '3000'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: app-admin/salt salt_api: app-admin/salt

View File

@ -91,6 +91,11 @@ values:
python_git: python-git python_git: python-git
release: '3000' release: '3000'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: app-admin/salt salt_api: app-admin/salt

View File

@ -94,6 +94,11 @@ values:
python_git: python-git python_git: python-git
release: '3000' release: '3000'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython python_git: GitPython
release: '3000' release: '3000'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython python_git: GitPython
release: '3000' release: '3000'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: python-git python_git: python-git
release: '3000' release: '3000'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: python-git python_git: python-git
release: '3000' release: '3000'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -90,6 +90,11 @@ values:
python_git: python-git python_git: python-git
release: '3000' release: '3000'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: kitchen rootuser: kitchen
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython python_git: GitPython
release: '3001' release: '3001'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython python_git: GitPython
release: '3001' release: '3001'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython python_git: GitPython
release: '3001' release: '3001'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -93,6 +93,11 @@ values:
python_git: python-git python_git: python-git
release: '3001' release: '3001'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -93,6 +93,11 @@ values:
python_git: python-git python_git: python-git
release: '3001' release: '3001'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython python_git: GitPython
release: '3001' release: '3001'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython python_git: GitPython
release: '3001' release: '3001'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -91,6 +91,11 @@ values:
python_git: python-git python_git: python-git
release: '3001' release: '3001'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: app-admin/salt salt_api: app-admin/salt

View File

@ -91,6 +91,11 @@ values:
python_git: python-git python_git: python-git
release: '3001' release: '3001'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: app-admin/salt salt_api: app-admin/salt

View File

@ -94,6 +94,11 @@ values:
python_git: python-git python_git: python-git
release: '3001' release: '3001'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: python-git python_git: python-git
release: '3001' release: '3001'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython python_git: GitPython
release: '3001' release: '3001'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython python_git: GitPython
release: '3001' release: '3001'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: python-git python_git: python-git
release: '3001' release: '3001'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: python-git python_git: python-git
release: '3001' release: '3001'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: python-git python_git: python-git
release: '3001' release: '3001'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 2
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython python_git: GitPython
release: '3002' release: '3002'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -93,6 +93,11 @@ values:
python_git: python2-gitpython python_git: python2-gitpython
release: '3002' release: '3002'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt salt_api: salt

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython python_git: GitPython
release: '3002' release: '3002'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython python_git: GitPython
release: '3002' release: '3002'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -93,6 +93,11 @@ values:
python_git: python-git python_git: python-git
release: '3002' release: '3002'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -93,6 +93,11 @@ values:
python_git: python-git python_git: python-git
release: '3002' release: '3002'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython python_git: GitPython
release: '3002' release: '3002'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython python_git: GitPython
release: '3002' release: '3002'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -91,6 +91,11 @@ values:
python_git: python-git python_git: python-git
release: '3002' release: '3002'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: app-admin/salt salt_api: app-admin/salt

View File

@ -91,6 +91,11 @@ values:
python_git: python-git python_git: python-git
release: '3002' release: '3002'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: app-admin/salt salt_api: app-admin/salt

View File

@ -94,6 +94,11 @@ values:
python_git: python-git python_git: python-git
release: '3002' release: '3002'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: python-git python_git: python-git
release: '3002' release: '3002'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython python_git: GitPython
release: '3002' release: '3002'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: GitPython python_git: GitPython
release: '3002' release: '3002'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: python-git python_git: python-git
release: '3002' release: '3002'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: python-git python_git: python-git
release: '3002' release: '3002'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -94,6 +94,11 @@ values:
python_git: python-git python_git: python-git
release: '3002' release: '3002'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: root rootuser: root
salt_api: salt-api salt_api: salt-api

View File

@ -90,6 +90,11 @@ values:
python_git: python-git python_git: python-git
release: '3002' release: '3002'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: kitchen rootuser: kitchen
salt_api: salt-api salt_api: salt-api

View File

@ -90,6 +90,11 @@ values:
python_git: python-git python_git: python-git
release: '3002' release: '3002'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: kitchen rootuser: kitchen
salt_api: salt-api salt_api: salt-api

View File

@ -90,6 +90,11 @@ values:
python_git: python-git python_git: python-git
release: '3002' release: '3002'
restart_via_at: false restart_via_at: false
retry_options:
attempts: 5
interval: 10
splay: 10
until: true
rootgroup: root rootgroup: root
rootuser: vagrant rootuser: vagrant
salt_api: salt-api salt_api: salt-api