Skip to content

Commit

Permalink
refactor(init.sls): apply pkg.installed retries
Browse files Browse the repository at this point in the history
Co-authored-by: Eugene Chepurniy <eugene.chepurniy@logianalytics.com>
  • Loading branch information
Niyakiy and Eugene Chepurniy authored Jun 7, 2022
1 parent d4aca78 commit c9be894
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions epel/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ epel_release:
- epel-release: {{ epel.rpm }}
- require:
- file: install_pubkey_epel
- retry: {{ epel.retry_options | json }}
{% if 'repos' in epel %}
{% for repo, config in epel.repos.items() %}
Expand Down
6 changes: 6 additions & 0 deletions epel/map.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
'common': {
'disabled': False,
'testing': False,
'retry_options': {
'attempts': 3,
'until': True,
'interval': 10,
'splay': 10,
},
},
'Amazon': salt['grains.filter_by']({
2: {
Expand Down
7 changes: 7 additions & 0 deletions pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,10 @@ epel:
enabled: false
epel-testing-source:
enabled: false

# https://docs.saltproject.io/en/latest/ref/states/requisites.html#retrying-states
retry_options:
attempts: 3
until: true
interval: 10
splay: 10

0 comments on commit c9be894

Please sign in to comment.