1
1
{%- from salt.file.dirname(tpldir) ~ " /map.jinja" import postgres as pg with context -% }
2
2
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
-
10
3
pg- extract- dirs:
11
4
file .directory:
12
5
- names:
13
6
- ' {{ pg.macos.tmpdir }} '
14
7
- makedirs: True
15
- - clean: True
16
8
- require_in:
17
9
- pg- download- archive
18
10
19
11
pg- download- archive:
20
12
pkg.installed:
21
13
- name: curl
22
14
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 }}
24
17
{% if grains[' saltversioninfo' ] >= [2017 , 7 , 0 ] % }
25
18
- retry:
26
19
attempts: {{ pg.macos.dl.retries }}
27
20
interval: {{ pg.macos.dl.interval }}
21
+ until: True
22
+ splay: 10
28
23
{% endif % }
29
24
30
25
{%- if pg.macos.postgresapp.sum % }
@@ -33,7 +28,7 @@ pg-check-archive-hash:
33
28
- name: file .check_hash
34
29
- path: ' {{ pg.macos.tmpdir }} /{{ pg.macos.archive }} '
35
30
- file_hash: {{ pg.macos.postgresapp.sum }}
36
- - onchanges :
31
+ - require :
37
32
- cmd: pg- download- archive
38
33
- require_in:
39
34
- archive: pg- package- install
@@ -51,14 +46,7 @@ pg-package-install:
51
46
- cmd: pg- download- archive
52
47
- require_in:
53
48
- file : pg- package- install
54
- - file : pg- remove- archive
55
49
file .append:
56
50
- name: {{ pg.userhomes }}/ {{ pg.user }}/ .bash_profile
57
51
- text: ' export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/latest/bin'
58
52
59
- pg- remove- archive:
60
- file .absent:
61
- - name: ' {{ pg.macos.tmpdir }} '
62
- - onchanges:
63
- - macpackage: pg- package- install
64
-
0 commit comments