* 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
```
Regex:
- `^` Line start
- `#*\s*` Find line even if commented out
- `(port)` 'port' -- capture as backreference `\1`
- `\s*=\s*` Equals sign, whether or not surrounded by whitespace
- `\d{4,5}` Existing port value, expected at 4/5 digits
- `(.*)` Remainder (i.e. comment) -- capture as backreference `\2`
- `$` Line end
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.
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']
This commit adds support for database extensions via
salt.states.postgres_extension
When configuring database pillar data all you need to do is add (optional)
extension list with the extensions that you want the state to apply to specific
database. Example:
db1:
owner: 'localUser'
user: 'localUser'
template: 'template0'
lc_ctype: 'C.UTF-8'
lc_collate: 'C.UTF-8'
extensions:
- uuid-ossp
This will make sure `uuid-ossp` extension is enabled on `db1` database.
Updated pillar.example to include (optional) extensions