Skip to content

Commit 69b57e3

Browse files
committed
fix(contributing): postgresql-repo state ID requires python3-apt package
1 parent 68a791e commit 69b57e3

File tree

6 files changed

+9
-14
lines changed

6 files changed

+9
-14
lines changed

postgres/defaults.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ postgres:
99
version: '10'
1010
pkg: postgresql
1111
pkgs_extra: []
12+
pkgs_deps: []
1213
pkg_client: postgresql-client
1314
pkg_dev: postgresql-devel
1415
pkg_dev_deps: []
@@ -76,7 +77,7 @@ postgres:
7677
sysrc: false
7778

7879
bake_image: false
79-
bake_image_run_cmd: echo "do nothing by default"
80+
bake_image_run_cmd: pg_ctl start
8081

8182
fromrepo: ''
8283

postgres/init.sls

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ include:
44
- postgres.macos
55
{% else %}
66
- postgres.server
7+
- postgres.server.image
78
- postgres.client
89
- postgres.manage
910
{% endif %}

postgres/osfamilymap.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Arch:
1212
pkg_dev: postgresql
1313

1414
Debian:
15+
pkgs_deps: ['python3-apt']
1516
pkg_repo:
1617
humanname: PostgreSQL Official Repository
1718
key_url: 'https://www.postgresql.org/media/keys/ACCC4CF8.asc'

postgres/server/image.sls

-10
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@
55
66
{%- if postgres.bake_image %}
77
8-
include:
9-
- postgres.server
10-
118
# An attempt to start PostgreSQL with `pg_ctl`
12-
139
postgresql-running:
1410
cmd.run:
1511
- name: {{ postgres.bake_image_run_cmd }}
@@ -40,10 +36,4 @@ postgresql-enable:
4036
- require:
4137
- cmd: postgresql-running
4238
43-
{%- else %}
44-
45-
postgresql-running:
46-
test.show_notification:
47-
- text: The 'postgres:bake_image' Pillar is disabled (set to 'False').
48-
4939
{%- endif %}

postgres/server/init.sls

-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
{%- from salt.file.dirname(tpldir) ~ "/map.jinja" import postgres with context -%}
22
33
{%- set includes = [] %}
4-
{%- if postgres.bake_image %}
5-
{%- do includes.append('postgres.server.image') %}
6-
{%- endif %}
74
{%- if postgres.use_upstream_repo == true -%}
85
{%- do includes.append('postgres.upstream') %}
96
{%- endif %}

postgres/upstream.sls

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ postgresql-profile:
1717
- defaults:
1818
bin_dir: {{ postgres.bin_dir }}
1919
{%- endif %}
20+
21+
postgresql-pkg-deps:
22+
pkg.installed:
23+
- pkgs: {{ postgres.pkgs_deps }}
24+
2025
# Add upstream repository for your distro
2126
postgresql-repo:
2227
pkgrepo.managed:

0 commit comments

Comments
 (0)