11{%- from salt.file.dirname(tpldir) ~ " /map.jinja" import postgres as pg with context -% }
22
3- # Cleanup first
4- pg- remove- prev- archive:
5- file .absent:
6- - name: ' {{ pg.macos.tmpdir }} /{{ pg.macos.archive }} '
7- - require_in:
8- - pg- extract- dirs
9-
103pg- extract- dirs:
114 file .directory:
125 - names:
136 - ' {{ pg.macos.tmpdir }} '
147 - makedirs: True
15- - clean: True
168 - require_in:
179 - pg- download- archive
1810
1911pg- download- archive:
2012 pkg.installed:
2113 - name: curl
2214 cmd.run:
23- - name: curl {{ pg.macos.dl.opts }} - o ' {{ pg.macos.tmpdir }} /{{ pg.macos.archive }} ' {{ pg.macos.postgresapp.url }}
15+ - name: curl {{ pg.macos.dl.opts }} - o {{ pg.macos.tmpdir }}/ {{ pg.macos.archive }} {{ pg.macos.postgresapp.url }}
16+ - unless: test - f {{ pg.macos.tmpdir }}/ {{ pg.macos.archive }}
2417 {% if grains[' saltversioninfo' ] >= [2017 , 7 , 0 ] % }
2518 - retry:
2619 attempts: {{ pg.macos.dl.retries }}
2720 interval: {{ pg.macos.dl.interval }}
21+ until: True
22+ splay: 10
2823 {% endif % }
2924
3025 {%- if pg.macos.postgresapp.sum % }
@@ -33,7 +28,7 @@ pg-check-archive-hash:
3328 - name: file .check_hash
3429 - path: ' {{ pg.macos.tmpdir }} /{{ pg.macos.archive }} '
3530 - file_hash: {{ pg.macos.postgresapp.sum }}
36- - onchanges :
31+ - require :
3732 - cmd: pg- download- archive
3833 - require_in:
3934 - archive: pg- package- install
@@ -51,14 +46,7 @@ pg-package-install:
5146 - cmd: pg- download- archive
5247 - require_in:
5348 - file : pg- package- install
54- - file : pg- remove- archive
5549 file .append:
5650 - name: {{ pg.userhomes }}/ {{ pg.user }}/ .bash_profile
5751 - text: ' export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/latest/bin'
5852
59- pg- remove- archive:
60- file .absent:
61- - name: ' {{ pg.macos.tmpdir }} '
62- - onchanges:
63- - macpackage: pg- package- install
64-
0 commit comments