Skip to content

Commit 5f7f504

Browse files
authored
Merge pull request #258 from noelmcloughlin/fixes
Always retry alternatives.install state
2 parents 58c36c5 + f3d8830 commit 5f7f504

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

postgres/client/init.sls

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ postgresql-{{ bin }}-altinstall:
3939
- onlyif: test -f {{ path }}
4040
- require:
4141
- pkg: postgresql-client-libs
42+
{%- if grains['saltversioninfo'] < [2018, 11, 0, 0] %}
43+
- retry:
44+
attempts: 2
45+
until: True
46+
{%- endif %}
4247
4348
{%- endfor %}
4449
{%- endif %}

postgres/dev/init.sls

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ postgresql-{{ bin }}-altinstall:
2323
- link: {{ salt['file.join']('/usr/bin', bin) }}
2424
- path: {{ path }}
2525
- priority: {{ postgres.linux.altpriority }}
26-
{% if grains.os in ('Fedora', 'CentOS',) %} {# bypass bug #}
27-
- onlyif: alternatives --display {{ bin }}
28-
{% else %}
2926
- onlyif: test -f {{ path }}
30-
{% endif %}
27+
{%- if grains['saltversioninfo'] < [2018, 11, 0, 0] %}
28+
- retry:
29+
attempts: 2
30+
until: True
31+
{%- endif %}
3132
3233
{%- endfor %}
3334
{%- endif %}

postgres/server/init.sls

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ postgresql-{{ bin }}-altinstall:
5454
- pkg: postgresql-server
5555
- require_in:
5656
- cmd: postgresql-cluster-prepared
57+
{%- if grains['saltversioninfo'] < [2018, 11, 0, 0] %}
58+
- retry:
59+
attempts: 2
60+
until: True
61+
{%- endif %}
5762
5863
{%- endfor %}
5964
{%- endif %}

0 commit comments

Comments
 (0)