Commit graph

56 commits

Author SHA1 Message Date
noelmcloughlin
92e0ad383c chore(version): bump to modern version 2021-06-09 21:43:13 +01:00
noelmcloughlin
b3f381e547 fix(suse): version 11+ repo support on suse 2020-12-02 23:33:09 +00:00
LitniAlex
69b57e3b69 fix(contributing): postgresql-repo state ID requires python3-apt package 2020-07-06 17:24:28 +03:00
LitniAlex
68a791ef09 fix(contributing): runnig formula inside container 2020-06-25 14:35:50 +03:00
Imran Iqbal
1f0fd92674
feat(yamllint): include for this repo and apply rules throughout
* Semi-automated using `ssf-formula` (v0.5.0)
* Fix (or ignore) errors shown below:

```bash
postgres-formula$ $(grep "\- yamllint" .travis.yml | sed -e "s:^\s\+-\s\(.*\):\1:")
./postgres/repo.yaml
  4:2       error    syntax error: found character '%' that cannot start any token
  6:89      error    line too long (110 > 88 characters)  (line-length)
  9:89      error    line too long (95 > 88 characters)  (line-length)
  13:89     error    line too long (104 > 88 characters)  (line-length)
  14:89     error    line too long (106 > 88 characters)  (line-length)

./postgres/defaults.yaml
  3:1       warning  missing document start "---"  (document-start)
  4:22      warning  truthy value should be one of [false, true]  (truthy)
  5:16      warning  truthy value should be one of [false, true]  (truthy)
  5:22      warning  too few spaces before comment  (comments)
  20:10     warning  truthy value should be one of [false, true]  (truthy)
  40:8      warning  missing starting space in comment  (comments)
  41:89     error    line too long (97 > 88 characters)  (line-length)
  71:11     error    too many spaces after colon  (colons)
  72:12     warning  truthy value should be one of [false, true]  (truthy)
  74:15     warning  truthy value should be one of [false, true]  (truthy)
  85:6      warning  missing starting space in comment  (comments)
  89:11     warning  truthy value should be one of [false, true]  (truthy)
  90:24     warning  truthy value should be one of [false, true]  (truthy)
  91:56     error    too few spaces after comma  (commas)

./postgres/codenamemap.yaml
  3:2       error    syntax error: found character '%' that cannot start any token
  8:89      error    line too long (98 > 88 characters)  (line-length)
  49:89     error    line too long (110 > 88 characters)  (line-length)
  53:89     error    line too long (99 > 88 characters)  (line-length)

./postgres/osmap.yaml
  1:2       error    syntax error: found character '%' that cannot start any token
  5:89      error    line too long (115 > 88 characters)  (line-length)

./postgres/osfamilymap.yaml
  1:2       error    syntax error: found character '%' that cannot start any token
  57:89     error    line too long (90 > 88 characters)  (line-length)
  58:89     error    line too long (113 > 88 characters)  (line-length)
  134:89    error    line too long (103 > 88 characters)  (line-length)
  135:89    error    line too long (127 > 88 characters)  (line-length)
  205:89    error    line too long (91 > 88 characters)  (line-length)
  206:89    error    line too long (91 > 88 characters)  (line-length)

pillar.example
  3:1       warning  missing document start "---"  (document-start)
  8:22      warning  truthy value should be one of [false, true]  (truthy)
  13:16     warning  truthy value should be one of [false, true]  (truthy)
  20:4      warning  missing starting space in comment  (comments)
  21:4      warning  missing starting space in comment  (comments)
  42:4      warning  missing starting space in comment  (comments)
  65:4      warning  missing starting space in comment  (comments)
  87:4      error    syntax error: found character '%' that cannot start any token

test/salt/pillar/postgres.sls
  4:2       error    syntax error: found character '%' that cannot start any token
```
2019-08-16 17:00:02 +01:00
sam
0aa8b4a048 fix(sysrc-svc): workaround *BSD minion indefinitely hanging on start
Check https://github.com/saltstack/salt/issues/44848 for further details
2019-05-13 08:44:52 +11:00
Niels Abspoel
5108b88a8b
Merge pull request #245 from gilou/optional_prepare
Make the preparation/initdb optional
2018-10-15 19:38:11 +02:00
Gilou
5c094a05ca Rename setting to add_profile, add an example to explain it 2018-10-11 02:37:51 +02:00
Gilou
f2c13abe9c add a profile.d script to add bin_dir to path 2018-10-10 18:04:35 +02:00
Gilou
6de97ce0f1 only run initdb/prepare cmd if asked for it, and let it run by default. 2018-10-09 19:48:47 +02:00
N
9d2f69a865 Enhance remove S/W support 2018-07-25 00:18:42 +01:00
Imran Iqbal
34aae257e5 Allow configuration of cluster name, locale & encoding 2018-06-21 08:30:08 +01:00
Niels Abspoel
9865664963
Merge pull request #228 from noelmcloughlin/confdata1
Allow conf/data directory separation
2018-06-20 10:46:26 +02:00
Niels Abspoel
aa91079a3c
Merge pull request #222 from myii/PR_psql10_acls
Enable replication connections by default in `pg_hba.conf`
2018-06-19 08:23:03 +02:00
N
764863fc8e Split conf/data directories, support 2018-06-18 23:46:29 +01:00
N
e3ffa44810 Handle postgres dev package dependencies 2018-06-16 17:55:51 +01:00
Imran Iqbal
9fdce93004 Set default version to 10 2018-06-13 02:07:16 +01:00
Imran Iqbal
311cb3d187 Enable replication connections by default in pg_hba.conf
Upstream commit:

- be37c2120a
- 9 Mar 2017
- master REL_11_BETA1 REL_10_4 ... REL_10_BETA1
2018-06-13 02:07:16 +01:00
Imran Iqbal
6a77bbbecd Prevent remaining defaults from being evaluated as string 'None' 2018-06-06 16:37:54 +01:00
myii
bfb158c0e3
Prevent default fromrepo being evaluated as string 'None'
Bare `fromrepo:` results in `{..., 'fromrepo': 'None', ...}`
2018-06-06 05:40:09 +01:00
N
6e21e4914a
Merge pull request #209 from noelmcloughlin/fromrepo
Introduce fromrepo support.
2018-05-09 17:45:32 +01:00
Noel McLoughlin
82ef464e86 Remove 'from_repo' in defaults & pkg_dev in codenamemap (not needed) 2018-05-08 09:40:51 +01:00
Marius B. Kotsbak
b5e3fdd3b0
Better data directory permission
Postgresql won't start without directory permission 0700.
2018-05-03 17:24:59 +02:00
noelmcloughlin
3f5c6b5010 Merge branch 'master' into fromrepo 2018-04-23 15:33:49 -06:00
noelmcloughlin
9b289b8402 Convert hex to decimal 2018-04-09 15:50:17 +01:00
noelmcloughlin
a4e184b79c fromrepo support 2018-04-09 14:59:49 +01:00
Brian Glogower
feb2b386ce
Allow setting dir mode for conf_dir in pillar
The current mode of 0775 causes start problems:

`FATAL:  data directory "/var/lib/postgresql/9.6/main" has group or world access`
2018-03-31 13:03:16 -07:00
noelmcloughlin
2d9ef7606d Merge branch 'master' of https://github.com/saltstack-formulas/postgres-formula into pkgs 2018-03-20 22:41:05 +00:00
noelmcloughlin
4d629f0b0c corrections for packages 2018-03-20 22:37:42 +00:00
Gilles Dartiguelongue
60cc787b16
Add support for configure pg_ident.conf 2018-03-12 16:40:27 +01:00
noelmcloughlin
1e527c4b91 POSTGRESAPP on MacOS 2018-03-08 11:53:38 +00:00
N
9e6adde7b5
Merge branch 'master' into alternatives 2018-03-06 16:26:08 +00:00
Noel McLoughin
db90890184 Tidyup alternatives system priority hardcoding 2018-02-22 22:07:43 +00:00
Noel McLoughin
1065e1c67c 'env' should be [] not {} in defaults.yml 2018-01-22 14:06:03 +00:00
Denys Havrysh
79b83fe414 Make local backup of pg_hba.conf file before modification 2017-01-13 12:09:45 +02:00
Denys Havrysh
186e972075 Use `bake_image` Pillar setting to control PG startup behavior 2017-01-07 16:19:14 +02:00
Denys Havrysh
d4ed4be16e Attempt to start and manage PostgreSQL service even if init system fails 2017-01-06 16:33:40 +02:00
Denys Havrysh
a291d40ef1 Fix and set useful backup extension for postgresql.conf file 2016-12-19 12:29:14 +02:00
Denys Havrysh
84713e8fea Set use_upstream_repo: True by default 2016-09-23 17:50:57 +03:00
Denys Havrysh
b4edec9f43 Ensure upstream repo is configured or absent depending on use_upstream_repo 2016-09-22 17:05:25 +03:00
Denys Havrysh
8c4dc07467 Map Pillar dicts for PostgreSQL entities to the Salt state arguments 2016-09-09 18:02:47 +03:00
Denys Havrysh
1ec55e0b96 Better ACL handling in the pg_hba.conf file 2016-09-06 14:44:35 +03:00
Denys Havrysh
8db04833c2 Set sane defaults when use_upstream_repo and version Pillars are set 2016-09-04 15:26:46 +03:00
Nicole Scherfenberg
2e26b6f606 fixes formula to comply to its spec
The reworks in merge #110 broke this formulas kitchen based specs.
This MR changes a few minor things, mostly  pillar.example and other inconsistent documentations.
Also, the use of db_user for `postgres_tablespace.present` and `postgres_database.present` now fits the states options, as db_password etc can be specified as well.
2016-08-05 20:44:45 +02:00
Jon Nelson
7a7396fcb2 remove explicit LC_ALL environment variable setting that only works on some distros 2016-07-19 10:09:39 -05:00
Jon Nelson
0220b67a85 - re-arrange cluster initialization to a set of variables in a dictionary
which control three things:
    1. should we initialize?
    2. if so, how?
    3. what environment variables and user to use
  The approach taken is very similar to what the Apache formula uses, namely:
  a default dictionary which is over-ridden by:
     os-specific defaults,
     then os codename defaults,
     then os finger defaults,
     and finally user-specified pillar values
- this also adds support for grains['osfinger']
2016-07-11 15:29:11 -05:00
Gilles Dartiguelongue
e0ed6b6e77 Kill create_cluster pillar switch, refs: #100
It is just a variant of init_db. A more correct solution would be to
support configuring a different initdb command while passing values from
the pillar by default like version. This would make it truly generic but
is probably not achievable given current pillar self-referencing
capabilities (ie. none).

Thus, I decided to make it OS family specific since Debian provides its
own tools to manage clusters, etc. Gentoo also has a specific way to
initialize a new cluster which does not fit with commands.initdb so
the current if/elif would be extended when support is added for Gentoo.
2016-06-07 12:00:50 +02:00
Tim Goodaire
fac8b6b936 Rename runtime_dir to data_dir 2016-05-24 11:40:14 -04:00
Tim Goodaire
e4bb5bf133 Improvements to initdb stuff 2016-05-24 11:02:30 -04:00
Tim Goodaire
8a4eb569f4 - Added initdb_user configuration, renamed postgres_user and postgres_group to user and group
- Corrected inadvertent changes to postgres_user
- Fixed postgres_user
- Explicitly list the grain that we're filtering by even though it's
  default
- Place *BSD user and runas into osmap instead of hardcoding
2016-05-23 15:02:26 -04:00