Compare commits
165 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
062399fc16 | ||
|
|
a45673a878 | ||
|
|
f589e96824 | ||
|
|
44ac9ff9d4 | ||
|
|
0a6cf8fefa | ||
|
|
150926401e | ||
|
|
e4900b47a1 | ||
|
|
8b44c068fc | ||
|
|
d6a6444e0d | ||
|
|
3a955e0270 | ||
|
|
d6d1068395 | ||
|
|
b3f381e547 | ||
|
|
5b9de35c59 | ||
|
|
8332a5de2e | ||
|
|
7036f60e8c | ||
|
|
d3d86ba2b7 | ||
|
|
6f73123e18 | ||
|
|
f04d60a773 | ||
|
|
db1794b6bb | ||
|
|
07e15d83e5 | ||
|
|
a53b921663 | ||
|
|
ab6b97e8c3 | ||
|
|
50808e8efe | ||
|
|
21baf28b2f | ||
|
|
5e6511b783 | ||
|
|
702323c24d | ||
|
|
8735cf8ad1 | ||
|
|
3a3d24a735 | ||
|
|
7978976543 | ||
|
|
44568a6806 | ||
|
|
1c0657b174 | ||
|
|
2c1ce2c3a4 | ||
|
|
904a5258cd | ||
|
|
2b10e6225f | ||
|
|
07044bf7c1 | ||
|
|
278893c2f0 | ||
|
|
8592ed02a0 | ||
|
|
69b57e3b69 | ||
|
|
81c7c9f957 | ||
|
|
fa0b4c41fa | ||
|
|
68a791ef09 | ||
|
|
26f3fa2f90 | ||
|
|
5e29999495 | ||
|
|
5d6514edfd | ||
|
|
1a6cba3aa3 | ||
|
|
f6e2040a40 | ||
|
|
442cfec245 | ||
|
|
9b1d4e44b9 | ||
|
|
babb024104 | ||
|
|
0c766c8e2e | ||
|
|
c46053abd8 | ||
|
|
35850da22c | ||
|
|
b914d67235 | ||
|
|
31180c4a92 | ||
|
|
e6b14853d5 | ||
|
|
5158f3053c | ||
|
|
85feac2852 | ||
|
|
061715e560 | ||
|
|
86697d8df4 | ||
|
|
9395aea4ea | ||
|
|
d145058343 | ||
|
|
d538798ee4 | ||
|
|
9cc95c0209 | ||
|
|
1392538665 | ||
|
|
a77bb06b18 | ||
|
|
0a2b63aba8 | ||
|
|
f0d12caac6 | ||
|
|
bd5959c60a | ||
|
|
8ce1ee4ecc | ||
|
|
c9a57aa96b | ||
|
|
20e5e46e10 | ||
|
|
ccaf4e5e37 | ||
|
|
f3ec66d5ed | ||
|
|
8080be6be3 | ||
|
|
b9b4f3e874 | ||
|
|
fbd8f65561 | ||
|
|
d606b28692 | ||
|
|
7ff798a27e | ||
|
|
eefb89ee75 | ||
|
|
81b2c2e86b | ||
|
|
62baac2764 | ||
|
|
5a291ab2d2 | ||
|
|
e568f28797 | ||
|
|
3d5564843d | ||
|
|
ddd1693e50 | ||
|
|
2c82872dd9 | ||
|
|
b369aa9d40 | ||
|
|
37b0c43839 | ||
|
|
911317c9ec | ||
|
|
a4c84df77e | ||
|
|
cd6eb0be16 | ||
|
|
a0fdd48ebb | ||
|
|
1f3cfccc0d | ||
|
|
bf5b4d6fd7 | ||
|
|
7822200a58 | ||
|
|
e546fc3476 | ||
|
|
4975410ca9 | ||
|
|
76e3e3983d | ||
|
|
3a27978204 | ||
|
|
89e4a34d3d | ||
|
|
934e8ff250 | ||
|
|
7ca61f3fbb | ||
|
|
4c1f76f2ff | ||
|
|
f99f2a0735 | ||
|
|
980ae5b42e | ||
|
|
eca6d97e59 | ||
|
|
5c21924335 | ||
|
|
81b1ed15c0 | ||
|
|
a799214c34 | ||
|
|
9796319a3f | ||
|
|
6e0245a9e7 | ||
|
|
fc6cbe0ab9 | ||
|
|
4c80c3641a | ||
|
|
3df38b1be2 | ||
|
|
e9709254c6 | ||
|
|
85a5dca346 | ||
|
|
aa96c783bb | ||
|
|
140928bfc2 | ||
|
|
677adbae16 | ||
|
|
766596e175 | ||
|
|
5160365a71 | ||
|
|
e81c633b4e | ||
|
|
19b6efbb33 | ||
|
|
1f0fd92674 | ||
|
|
115f638107 | ||
|
|
84eef0cf07 | ||
|
|
5df8f79dc1 | ||
|
|
0046482adf | ||
|
|
904ba271ca | ||
|
|
e5700f48c5 | ||
|
|
aa492c3ba9 | ||
|
|
72ff82ce75 | ||
|
|
5e631bf7d8 | ||
|
|
d999597a91 | ||
|
|
45a921dc4e | ||
|
|
3f81439991 | ||
|
|
44b8fb1bc2 | ||
|
|
cb4e405098 | ||
|
|
2ff919f1bf | ||
|
|
81165fc405 | ||
|
|
a054cea962 | ||
|
|
77960641dd | ||
|
|
cb8de937a5 | ||
|
|
5763d220e5 | ||
|
|
8745365d71 | ||
|
|
10126fb740 | ||
|
|
65519cb06f | ||
|
|
0aa8b4a048 | ||
|
|
425049ceec | ||
|
|
07d491e2cb | ||
|
|
850ca6ae88 | ||
|
|
e1dd2b3871 | ||
|
|
2a54616bc0 | ||
|
|
7d3aa19b45 | ||
|
|
bf6a653e0b | ||
|
|
49fdd3333b | ||
|
|
4cfde8d6e9 | ||
|
|
7b7aadc472 | ||
|
|
3c53684109 | ||
|
|
58ac122d50 | ||
|
|
c64d9e4ab9 | ||
|
|
6467df70a0 | ||
|
|
611ec11353 | ||
|
|
8f7cbdebc7 | ||
|
|
157e1693a4 |
16
.github/workflows/commitlint.yml
vendored
Normal file
16
.github/workflows/commitlint.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=yaml
|
||||||
|
---
|
||||||
|
name: Commitlint
|
||||||
|
'on': [pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: wagoid/commitlint-github-action@v1
|
||||||
125
.gitignore
vendored
125
.gitignore
vendored
@@ -1,3 +1,122 @@
|
|||||||
.kitchen/
|
# Byte-compiled / optimized / DLL files
|
||||||
*.swp
|
__pycache__/
|
||||||
*.swo
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
|
||||||
|
# C extensions
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Distribution / packaging
|
||||||
|
.Python
|
||||||
|
env/
|
||||||
|
build/
|
||||||
|
develop-eggs/
|
||||||
|
dist/
|
||||||
|
downloads/
|
||||||
|
eggs/
|
||||||
|
.eggs/
|
||||||
|
lib/
|
||||||
|
lib64/
|
||||||
|
parts/
|
||||||
|
sdist/
|
||||||
|
var/
|
||||||
|
wheels/
|
||||||
|
*.egg-info/
|
||||||
|
.installed.cfg
|
||||||
|
*.egg
|
||||||
|
|
||||||
|
# PyInstaller
|
||||||
|
# Usually these files are written by a python script from a packager
|
||||||
|
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||||
|
*.manifest
|
||||||
|
*.spec
|
||||||
|
|
||||||
|
# Installer logs
|
||||||
|
pip-log.txt
|
||||||
|
pip-delete-this-directory.txt
|
||||||
|
|
||||||
|
# Unit test / coverage reports
|
||||||
|
htmlcov/
|
||||||
|
.tox/
|
||||||
|
.coverage
|
||||||
|
.coverage.*
|
||||||
|
.cache
|
||||||
|
nosetests.xml
|
||||||
|
coverage.xml
|
||||||
|
*.cover
|
||||||
|
.hypothesis/
|
||||||
|
.kitchen
|
||||||
|
.kitchen.local.yml
|
||||||
|
kitchen.local.yml
|
||||||
|
junit-*.xml
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
*.mo
|
||||||
|
*.pot
|
||||||
|
|
||||||
|
# Django stuff:
|
||||||
|
*.log
|
||||||
|
local_settings.py
|
||||||
|
|
||||||
|
# Flask stuff:
|
||||||
|
instance/
|
||||||
|
.webassets-cache
|
||||||
|
|
||||||
|
# Scrapy stuff:
|
||||||
|
.scrapy
|
||||||
|
|
||||||
|
# Sphinx documentation
|
||||||
|
docs/_build/
|
||||||
|
|
||||||
|
# PyBuilder
|
||||||
|
target/
|
||||||
|
|
||||||
|
# Jupyter Notebook
|
||||||
|
.ipynb_checkpoints
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
.python-version
|
||||||
|
|
||||||
|
# celery beat schedule file
|
||||||
|
celerybeat-schedule
|
||||||
|
|
||||||
|
# SageMath parsed files
|
||||||
|
*.sage.py
|
||||||
|
|
||||||
|
# dotenv
|
||||||
|
.env
|
||||||
|
|
||||||
|
# virtualenv
|
||||||
|
.venv
|
||||||
|
venv/
|
||||||
|
ENV/
|
||||||
|
|
||||||
|
# Spyder project settings
|
||||||
|
.spyderproject
|
||||||
|
.spyproject
|
||||||
|
|
||||||
|
# Rope project settings
|
||||||
|
.ropeproject
|
||||||
|
|
||||||
|
# mkdocs documentation
|
||||||
|
/site
|
||||||
|
|
||||||
|
# mypy
|
||||||
|
.mypy_cache/
|
||||||
|
|
||||||
|
# Bundler
|
||||||
|
.bundle/
|
||||||
|
|
||||||
|
# copied `.md` files used for conversion to `.rst` using `m2r`
|
||||||
|
docs/*.md
|
||||||
|
|
||||||
|
# Vim
|
||||||
|
*.sw?
|
||||||
|
|
||||||
|
## Collected when centralising formulas (check and sort)
|
||||||
|
# `collectd-formula`
|
||||||
|
.pytest_cache/
|
||||||
|
/.idea/
|
||||||
|
Dockerfile.*_*
|
||||||
|
ignore/
|
||||||
|
tmp/
|
||||||
|
|||||||
156
.gitlab-ci.yml
Normal file
156
.gitlab-ci.yml
Normal file
@@ -0,0 +1,156 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=yaml
|
||||||
|
---
|
||||||
|
###############################################################################
|
||||||
|
# Define all YAML node anchors
|
||||||
|
###############################################################################
|
||||||
|
.node_anchors:
|
||||||
|
# `only` (also used for `except` where applicable)
|
||||||
|
only_branch_master_parent_repo: &only_branch_master_parent_repo
|
||||||
|
- 'master@saltstack-formulas/postgres-formula'
|
||||||
|
# `stage`
|
||||||
|
stage_lint: &stage_lint 'lint'
|
||||||
|
stage_release: &stage_release 'release'
|
||||||
|
stage_test: &stage_test 'test'
|
||||||
|
# `image`
|
||||||
|
image_commitlint: &image_commitlint 'myii/ssf-commitlint:11'
|
||||||
|
image_dindruby: &image_dindruby 'myii/ssf-dind-ruby:2.7.1-r3'
|
||||||
|
image_precommit: &image_precommit
|
||||||
|
name: 'myii/ssf-pre-commit:2.9.2'
|
||||||
|
entrypoint: ['/bin/bash', '-c']
|
||||||
|
image_semantic-release: &image_semanticrelease 'myii/ssf-semantic-release:15.14'
|
||||||
|
# `services`
|
||||||
|
services_docker_dind: &services_docker_dind
|
||||||
|
- 'docker:dind'
|
||||||
|
# `variables`
|
||||||
|
# https://forum.gitlab.com/t/gitlab-com-ci-caching-rubygems/5627/3
|
||||||
|
# https://bundler.io/v1.16/bundle_config.html
|
||||||
|
variables_bundler: &variables_bundler
|
||||||
|
BUNDLE_CACHE_PATH: '${CI_PROJECT_DIR}/.cache/bundler'
|
||||||
|
BUNDLE_WITHOUT: 'production'
|
||||||
|
# `cache`
|
||||||
|
cache_bundler: &cache_bundler
|
||||||
|
key: '${CI_JOB_STAGE}'
|
||||||
|
paths:
|
||||||
|
- '${BUNDLE_CACHE_PATH}'
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Define stages and global variables
|
||||||
|
###############################################################################
|
||||||
|
stages:
|
||||||
|
- *stage_lint
|
||||||
|
- *stage_test
|
||||||
|
- *stage_release
|
||||||
|
variables:
|
||||||
|
DOCKER_DRIVER: 'overlay2'
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# `lint` stage: `commitlint` & `pre-commit`
|
||||||
|
###############################################################################
|
||||||
|
commitlint:
|
||||||
|
stage: *stage_lint
|
||||||
|
image: *image_commitlint
|
||||||
|
script:
|
||||||
|
# Add `upstream` remote to get access to `upstream/master`
|
||||||
|
- 'git remote add upstream ${CI_PROJECT_URL}.git'
|
||||||
|
- 'git fetch --all'
|
||||||
|
# Set default commit hashes for `--from` and `--to`
|
||||||
|
- 'export COMMITLINT_FROM="$(git merge-base upstream/master HEAD)"'
|
||||||
|
- 'export COMMITLINT_TO="${CI_COMMIT_SHA}"'
|
||||||
|
# `coqbot` adds a merge commit to test PRs on top of the latest commit in
|
||||||
|
# the repo; amend this merge commit message to avoid failure
|
||||||
|
- |
|
||||||
|
if [ "${GITLAB_USER_LOGIN}" = "coqbot" ] \
|
||||||
|
&& [ "${CI_COMMIT_BRANCH}" != "master" ]; then
|
||||||
|
git commit --amend -m \
|
||||||
|
'chore: reword coqbot merge commit message for commitlint'
|
||||||
|
export COMMITLINT_TO=HEAD
|
||||||
|
fi
|
||||||
|
# Run `commitlint`
|
||||||
|
- 'commitlint --from "${COMMITLINT_FROM}"
|
||||||
|
--to "${COMMITLINT_TO}"
|
||||||
|
--verbose'
|
||||||
|
|
||||||
|
pre-commit:
|
||||||
|
stage: *stage_lint
|
||||||
|
image: *image_precommit
|
||||||
|
# https://pre-commit.com/#gitlab-ci-example
|
||||||
|
variables:
|
||||||
|
PRE_COMMIT_HOME: '${CI_PROJECT_DIR}/.cache/pre-commit'
|
||||||
|
cache:
|
||||||
|
key: '${CI_JOB_NAME}'
|
||||||
|
paths:
|
||||||
|
- '${PRE_COMMIT_HOME}'
|
||||||
|
script:
|
||||||
|
- 'pre-commit run --all-files --color always --verbose'
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Define `test` template
|
||||||
|
###############################################################################
|
||||||
|
.test_instance:
|
||||||
|
stage: *stage_test
|
||||||
|
image: *image_dindruby
|
||||||
|
services: *services_docker_dind
|
||||||
|
variables: *variables_bundler
|
||||||
|
cache: *cache_bundler
|
||||||
|
before_script:
|
||||||
|
# TODO: This should work from the env vars above automatically
|
||||||
|
- 'bundle config set path "${BUNDLE_CACHE_PATH}"'
|
||||||
|
- 'bundle config set without "${BUNDLE_WITHOUT}"'
|
||||||
|
- 'bundle install'
|
||||||
|
script:
|
||||||
|
# Alternative value to consider: `${CI_JOB_NAME}`
|
||||||
|
- 'bin/kitchen verify "${DOCKER_ENV_CI_JOB_NAME}"'
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# `test` stage: each instance below uses the `test` template above
|
||||||
|
###############################################################################
|
||||||
|
## Define the rest of the matrix based on Kitchen testing
|
||||||
|
# Make sure the instances listed below match up with
|
||||||
|
# the `platforms` defined in `kitchen.yml`
|
||||||
|
default-debian-10-master-py3: {extends: '.test_instance'}
|
||||||
|
default-ubuntu-2004-master-py3: {extends: '.test_instance'}
|
||||||
|
# default-ubuntu-1804-master-py3: {extends: '.test_instance'}
|
||||||
|
default-centos-8-master-py3: {extends: '.test_instance'}
|
||||||
|
default-fedora-32-master-py3: {extends: '.test_instance'}
|
||||||
|
# default-fedora-31-master-py3: {extends: '.test_instance'}
|
||||||
|
default-opensuse-leap-152-master-py3: {extends: '.test_instance'}
|
||||||
|
default-amazonlinux-2-master-py3: {extends: '.test_instance'}
|
||||||
|
# default-debian-10-3000-3-py3: {extends: '.test_instance'}
|
||||||
|
# default-debian-9-3000-3-py3: {extends: '.test_instance'}
|
||||||
|
# default-ubuntu-1804-3000-3-py3: {extends: '.test_instance'}
|
||||||
|
# default-centos-8-3000-3-py3: {extends: '.test_instance'}
|
||||||
|
# default-centos-7-3000-3-py3: {extends: '.test_instance'}
|
||||||
|
# default-fedora-31-3000-3-py3: {extends: '.test_instance'}
|
||||||
|
# default-opensuse-leap-152-3000-3-py3: {extends: '.test_instance'}
|
||||||
|
# default-amazonlinux-2-3000-3-py3: {extends: '.test_instance'}
|
||||||
|
# default-ubuntu-1804-3000-3-py2: {extends: '.test_instance'}
|
||||||
|
# default-ubuntu-1604-3000-3-py2: {extends: '.test_instance'}
|
||||||
|
# default-arch-base-latest-3000-3-py2: {extends: '.test_instance'}
|
||||||
|
# default-debian-10-2019-2-py3: {extends: '.test_instance'}
|
||||||
|
# default-debian-9-2019-2-py3: {extends: '.test_instance'}
|
||||||
|
# default-ubuntu-1804-2019-2-py3: {extends: '.test_instance'}
|
||||||
|
# default-ubuntu-1604-2019-2-py3: {extends: '.test_instance'}
|
||||||
|
# default-centos-8-2019-2-py3: {extends: '.test_instance'}
|
||||||
|
# default-centos-7-2019-2-py3: {extends: '.test_instance'}
|
||||||
|
# default-fedora-31-2019-2-py3: {extends: '.test_instance'}
|
||||||
|
# default-opensuse-leap-152-2019-2-py3: {extends: '.test_instance'}
|
||||||
|
# default-amazonlinux-2-2019-2-py3: {extends: '.test_instance'}
|
||||||
|
# default-centos-6-2019-2-py2: {extends: '.test_instance'}
|
||||||
|
# default-amazonlinux-1-2019-2-py2: {extends: '.test_instance'}
|
||||||
|
default-arch-base-latest-2019-2-py2: {extends: '.test_instance'}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# `release` stage: `semantic-release`
|
||||||
|
###############################################################################
|
||||||
|
semantic-release:
|
||||||
|
only: *only_branch_master_parent_repo
|
||||||
|
stage: *stage_release
|
||||||
|
image: *image_semanticrelease
|
||||||
|
variables:
|
||||||
|
MAINTAINER_TOKEN: '${GH_TOKEN}'
|
||||||
|
script:
|
||||||
|
# Update `AUTHORS.md`
|
||||||
|
- '${HOME}/go/bin/maintainer contributor'
|
||||||
|
# Run `semantic-release`
|
||||||
|
- 'semantic-release'
|
||||||
26
.kitchen.yml
26
.kitchen.yml
@@ -1,26 +0,0 @@
|
|||||||
---
|
|
||||||
driver:
|
|
||||||
name: vagrant
|
|
||||||
network:
|
|
||||||
- ["private_network", { ip: "192.168.33.33" }]
|
|
||||||
|
|
||||||
provisioner:
|
|
||||||
name: salt_solo
|
|
||||||
formula: postgres
|
|
||||||
pillars-from-files:
|
|
||||||
postgres.sls: pillar.example
|
|
||||||
pillars:
|
|
||||||
top.sls:
|
|
||||||
base:
|
|
||||||
"*":
|
|
||||||
- postgres
|
|
||||||
state_top:
|
|
||||||
base:
|
|
||||||
"*":
|
|
||||||
- postgres
|
|
||||||
|
|
||||||
platforms:
|
|
||||||
- name: ubuntu-14.04
|
|
||||||
|
|
||||||
suites:
|
|
||||||
- name: default
|
|
||||||
56
.pre-commit-config.yaml
Normal file
56
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=yaml
|
||||||
|
---
|
||||||
|
# See https://pre-commit.com for more information
|
||||||
|
# See https://pre-commit.com/hooks.html for more hooks
|
||||||
|
default_stages: [commit]
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/dafyddj/commitlint-pre-commit-hook
|
||||||
|
rev: v2.3.0
|
||||||
|
hooks:
|
||||||
|
- id: commitlint
|
||||||
|
name: Check commit message using commitlint
|
||||||
|
description: Lint commit message against @commitlint/config-conventional rules
|
||||||
|
stages: [commit-msg]
|
||||||
|
additional_dependencies: ['@commitlint/config-conventional@8.3.4']
|
||||||
|
- id: commitlint-travis
|
||||||
|
stages: [manual]
|
||||||
|
additional_dependencies: ['@commitlint/config-conventional@8.3.4']
|
||||||
|
always_run: true
|
||||||
|
- repo: https://github.com/adithyabsk/mirrors-rubocop
|
||||||
|
rev: v0.91.0
|
||||||
|
hooks:
|
||||||
|
- id: rubocop
|
||||||
|
name: Check Ruby files with rubocop
|
||||||
|
args: [--debug]
|
||||||
|
always_run: true
|
||||||
|
pass_filenames: false
|
||||||
|
- repo: https://github.com/jumanjihouse/pre-commit-hooks
|
||||||
|
rev: 2.1.3
|
||||||
|
hooks:
|
||||||
|
- id: shellcheck
|
||||||
|
name: Check shell scripts with shellcheck
|
||||||
|
files: ^.*\.(sh|bash|ksh)$
|
||||||
|
types: []
|
||||||
|
args: []
|
||||||
|
- repo: https://github.com/adrienverge/yamllint.git
|
||||||
|
rev: v1.23.0
|
||||||
|
hooks:
|
||||||
|
- id: yamllint
|
||||||
|
name: Check YAML syntax with yamllint
|
||||||
|
args: [--strict, '.']
|
||||||
|
always_run: true
|
||||||
|
pass_filenames: false
|
||||||
|
- repo: https://github.com/warpnet/salt-lint
|
||||||
|
rev: v0.3.0
|
||||||
|
hooks:
|
||||||
|
- id: salt-lint
|
||||||
|
name: Check Salt files using salt-lint
|
||||||
|
files: ^.*\.(sls|jinja|j2|tmpl|tst)$
|
||||||
|
- repo: https://github.com/myint/rstcheck
|
||||||
|
rev: 3f929574
|
||||||
|
hooks:
|
||||||
|
- id: rstcheck
|
||||||
|
name: Check reST files using rstcheck
|
||||||
|
exclude: 'docs/CHANGELOG.rst'
|
||||||
|
args: [--report=warning]
|
||||||
3
.rstcheck.cfg
Normal file
3
.rstcheck.cfg
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[rstcheck]
|
||||||
|
report=error
|
||||||
|
ignore_language=rst
|
||||||
16
.rubocop.yml
Normal file
16
.rubocop.yml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=yaml
|
||||||
|
---
|
||||||
|
# General overrides used across formulas in the org
|
||||||
|
Layout/LineLength:
|
||||||
|
# Increase from default of `80`
|
||||||
|
# Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`)
|
||||||
|
Max: 88
|
||||||
|
Metrics/BlockLength:
|
||||||
|
ExcludedMethods:
|
||||||
|
- control
|
||||||
|
- describe
|
||||||
|
# Increase from default of `25`
|
||||||
|
Max: 30
|
||||||
|
|
||||||
|
# Any offenses that should be fixed, e.g. collected via. `rubocop --auto-gen-config`
|
||||||
14
.salt-lint
Normal file
14
.salt-lint
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=yaml
|
||||||
|
---
|
||||||
|
exclude_paths: []
|
||||||
|
rules: {}
|
||||||
|
skip_list:
|
||||||
|
# Using `salt-lint` for linting other files as well, such as Jinja macros/templates
|
||||||
|
- 205 # Use ".sls" as a Salt State file extension
|
||||||
|
# Skipping `207` and `208` because `210` is sufficient, at least for the time-being
|
||||||
|
# I.e. Allows 3-digit unquoted codes to still be used, such as `644` and `755`
|
||||||
|
- 207 # File modes should always be encapsulated in quotation marks
|
||||||
|
- 208 # File modes should always contain a leading zero
|
||||||
|
tags: []
|
||||||
|
verbosity: 1
|
||||||
154
.travis.yml
Normal file
154
.travis.yml
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=yaml
|
||||||
|
---
|
||||||
|
################################################################################
|
||||||
|
# NOTE: This file is UNMAINTAINED; it is provided for references purposes only.
|
||||||
|
# No guarantees are tendered that this structure will work after 2020.
|
||||||
|
################################################################################
|
||||||
|
# * https://en.wikipedia.org/wiki/Travis_CI:
|
||||||
|
# - "... free open-source plans were removed in [sic] the end of 2020"
|
||||||
|
# - https://blog.travis-ci.com/2020-11-02-travis-ci-new-billing
|
||||||
|
# - https://ropensci.org/technotes/2020/11/19/moving-away-travis/
|
||||||
|
################################################################################
|
||||||
|
## Machine config
|
||||||
|
os: 'linux'
|
||||||
|
arch: 'amd64'
|
||||||
|
dist: 'bionic'
|
||||||
|
version: '~> 1.0'
|
||||||
|
|
||||||
|
## Language and cache config
|
||||||
|
language: 'ruby'
|
||||||
|
cache: 'bundler'
|
||||||
|
|
||||||
|
## Services config
|
||||||
|
services:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
## Script to run for the test stage
|
||||||
|
script:
|
||||||
|
- bin/kitchen verify "${INSTANCE}"
|
||||||
|
|
||||||
|
## Stages and jobs matrix
|
||||||
|
stages:
|
||||||
|
- test
|
||||||
|
# # As part of the switch away from Travis CI, ensure that the `release` stage
|
||||||
|
# # is not run inadvertently
|
||||||
|
# - name: 'release'
|
||||||
|
# if: 'branch = master AND type != pull_request'
|
||||||
|
jobs:
|
||||||
|
include:
|
||||||
|
## Define the test stage that runs the linters (and testing matrix, if applicable)
|
||||||
|
|
||||||
|
# Run all of the linters in a single job
|
||||||
|
- language: 'node_js'
|
||||||
|
node_js: 'lts/*'
|
||||||
|
env: 'Lint'
|
||||||
|
name: 'Lint: salt-lint, yamllint, rubocop, shellcheck & commitlint'
|
||||||
|
before_install: 'skip'
|
||||||
|
script:
|
||||||
|
# Install and run `salt-lint`
|
||||||
|
- pip install --user salt-lint
|
||||||
|
- git ls-files -- '*.sls' '*.jinja' '*.j2' '*.tmpl' '*.tst'
|
||||||
|
| xargs salt-lint
|
||||||
|
# Install and run `yamllint`
|
||||||
|
# Need at least `v1.17.0` for the `yaml-files` setting
|
||||||
|
- pip install --user yamllint>=1.17.0
|
||||||
|
- yamllint -s .
|
||||||
|
# Install and run `rubocop`
|
||||||
|
- gem install rubocop
|
||||||
|
- rubocop -d
|
||||||
|
# Run `shellcheck` (already pre-installed in Travis)
|
||||||
|
- shellcheck --version
|
||||||
|
- git ls-files -- '*.sh' '*.bash' '*.ksh'
|
||||||
|
| xargs shellcheck
|
||||||
|
# Install and run `commitlint`
|
||||||
|
- npm i -D @commitlint/config-conventional
|
||||||
|
@commitlint/travis-cli
|
||||||
|
- commitlint-travis
|
||||||
|
|
||||||
|
# Run `pre-commit` linters in a single job
|
||||||
|
- language: 'python'
|
||||||
|
env: 'Lint_pre-commit'
|
||||||
|
name: 'Lint: pre-commit'
|
||||||
|
before_install: 'skip'
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- $HOME/.cache/pre-commit
|
||||||
|
script:
|
||||||
|
# Install and run `pre-commit`
|
||||||
|
- pip install pre-commit==2.7.1
|
||||||
|
- pre-commit run --all-files --color always --verbose
|
||||||
|
- pre-commit run --color always --hook-stage manual --verbose commitlint-travis
|
||||||
|
|
||||||
|
## Define the rest of the matrix based on Kitchen testing
|
||||||
|
# Make sure the instances listed below match up with
|
||||||
|
# the `platforms` defined in `kitchen.yml`
|
||||||
|
- env: INSTANCE=default-debian-10-master-py3
|
||||||
|
- env: INSTANCE=default-ubuntu-2004-master-py3
|
||||||
|
# - env: INSTANCE=default-ubuntu-1804-master-py3
|
||||||
|
- env: INSTANCE=default-centos-8-master-py3
|
||||||
|
- env: INSTANCE=default-fedora-32-master-py3
|
||||||
|
# - env: INSTANCE=default-fedora-31-master-py3
|
||||||
|
- env: INSTANCE=default-opensuse-leap-152-master-py3
|
||||||
|
- env: INSTANCE=default-amazonlinux-2-master-py3
|
||||||
|
# - env: INSTANCE=default-debian-10-3000-3-py3
|
||||||
|
# - env: INSTANCE=default-debian-9-3000-3-py3
|
||||||
|
# - env: INSTANCE=default-ubuntu-1804-3000-3-py3
|
||||||
|
# - env: INSTANCE=default-centos-8-3000-3-py3
|
||||||
|
# - env: INSTANCE=default-centos-7-3000-3-py3
|
||||||
|
# - env: INSTANCE=default-fedora-31-3000-3-py3
|
||||||
|
# - env: INSTANCE=default-opensuse-leap-152-3000-3-py3
|
||||||
|
# - env: INSTANCE=default-amazonlinux-2-3000-3-py3
|
||||||
|
# - env: INSTANCE=default-ubuntu-1804-3000-3-py2
|
||||||
|
# - env: INSTANCE=default-ubuntu-1604-3000-3-py2
|
||||||
|
# - env: INSTANCE=default-arch-base-latest-3000-3-py2
|
||||||
|
# - env: INSTANCE=default-debian-10-2019-2-py3
|
||||||
|
# - env: INSTANCE=default-debian-9-2019-2-py3
|
||||||
|
# - env: INSTANCE=default-ubuntu-1804-2019-2-py3
|
||||||
|
# - env: INSTANCE=default-ubuntu-1604-2019-2-py3
|
||||||
|
# - env: INSTANCE=default-centos-8-2019-2-py3
|
||||||
|
# - env: INSTANCE=default-centos-7-2019-2-py3
|
||||||
|
# - env: INSTANCE=default-fedora-31-2019-2-py3
|
||||||
|
# - env: INSTANCE=default-opensuse-leap-152-2019-2-py3
|
||||||
|
# - env: INSTANCE=default-amazonlinux-2-2019-2-py3
|
||||||
|
# - env: INSTANCE=default-centos-6-2019-2-py2
|
||||||
|
# - env: INSTANCE=default-amazonlinux-1-2019-2-py2
|
||||||
|
- env: INSTANCE=default-arch-base-latest-2019-2-py2
|
||||||
|
|
||||||
|
## Define the release stage that runs `semantic-release`
|
||||||
|
- stage: 'release'
|
||||||
|
language: 'node_js'
|
||||||
|
node_js: 'lts/*'
|
||||||
|
env: 'Release'
|
||||||
|
name: 'Run semantic-release inc. file updates to AUTHORS, CHANGELOG & FORMULA'
|
||||||
|
before_install: 'skip'
|
||||||
|
script:
|
||||||
|
# Update `AUTHORS.md`
|
||||||
|
- export MAINTAINER_TOKEN=${GH_TOKEN}
|
||||||
|
- go get github.com/myii/maintainer
|
||||||
|
- maintainer contributor
|
||||||
|
|
||||||
|
# Install all dependencies required for `semantic-release`
|
||||||
|
- npm i -D @semantic-release/changelog@3
|
||||||
|
@semantic-release/exec@3
|
||||||
|
@semantic-release/git@7
|
||||||
|
deploy:
|
||||||
|
provider: 'script'
|
||||||
|
# Opt-in to `dpl v2` to complete the Travis build config validation (beta)
|
||||||
|
# * https://docs.travis-ci.com/user/build-config-validation
|
||||||
|
# Deprecated `skip_cleanup` can now be avoided, `cleanup: false` is by default
|
||||||
|
edge: true
|
||||||
|
# Run `semantic-release`
|
||||||
|
script: 'npx semantic-release@15.14'
|
||||||
|
|
||||||
|
# Notification options: `always`, `never` or `change`
|
||||||
|
notifications:
|
||||||
|
webhooks:
|
||||||
|
if: 'repo = saltstack-formulas/postgres-formula'
|
||||||
|
urls:
|
||||||
|
- https://saltstack-formulas.zulipchat.com/api/v1/external/travis?api_key=HsIq3o5QmLxdnVCKF9is0FUIpkpAY79P&stream=CI&topic=saltstack-formulas%2Fpostgres-formula&ignore_pull_requests=true
|
||||||
|
on_success: always # default: always
|
||||||
|
on_failure: always # default: always
|
||||||
|
on_start: always # default: never
|
||||||
|
on_cancel: always # default: always
|
||||||
|
on_error: always # default: always
|
||||||
44
.yamllint
Normal file
44
.yamllint
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=yaml
|
||||||
|
---
|
||||||
|
# Extend the `default` configuration provided by `yamllint`
|
||||||
|
extends: default
|
||||||
|
|
||||||
|
# Files to ignore completely
|
||||||
|
# 1. All YAML files under directory `node_modules/`, introduced during the Travis run
|
||||||
|
# 2. Any SLS files under directory `test/`, which are actually state files
|
||||||
|
# 3. Any YAML files under directory `.kitchen/`, introduced during local testing
|
||||||
|
# 4. All YAML files heavily reliant on Jinja; these can be tackled in a subsequent PR
|
||||||
|
ignore: |
|
||||||
|
.cache/
|
||||||
|
node_modules/
|
||||||
|
test/**/states/**/*.sls
|
||||||
|
.kitchen/
|
||||||
|
pillar.example
|
||||||
|
postgres/codenamemap.yaml
|
||||||
|
postgres/osfamilymap.yaml
|
||||||
|
postgres/osmap.yaml
|
||||||
|
postgres/repo.yaml
|
||||||
|
test/salt/pillar/postgres.sls
|
||||||
|
|
||||||
|
yaml-files:
|
||||||
|
# Default settings
|
||||||
|
- '*.yaml'
|
||||||
|
- '*.yml'
|
||||||
|
- .salt-lint
|
||||||
|
- .yamllint
|
||||||
|
# SaltStack Formulas additional settings
|
||||||
|
- '*.example'
|
||||||
|
- test/**/*.sls
|
||||||
|
|
||||||
|
rules:
|
||||||
|
empty-values:
|
||||||
|
forbid-in-block-mappings: true
|
||||||
|
forbid-in-flow-mappings: true
|
||||||
|
line-length:
|
||||||
|
# Increase from default of `80`
|
||||||
|
# Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`)
|
||||||
|
max: 88
|
||||||
|
octal-values:
|
||||||
|
forbid-implicit-octal: true
|
||||||
|
forbid-explicit-octal: true
|
||||||
74
AUTHORS.md
Normal file
74
AUTHORS.md
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
# Authors
|
||||||
|
|
||||||
|
This list is sorted by the number of commits per contributor in _descending_ order.
|
||||||
|
|
||||||
|
Avatar|Contributor|Contributions
|
||||||
|
:-:|---|:-:
|
||||||
|
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/10231489?v=4' width='36' height='36' alt='@myii'>|[@myii](https://github.com/myii)|129
|
||||||
|
<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/13322818?v=4' width='36' height='36' alt='@noelmcloughlin'>|[@noelmcloughlin](https://github.com/noelmcloughlin)|72
|
||||||
|
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/1800660?v=4' width='36' height='36' alt='@aboe76'>|[@aboe76](https://github.com/aboe76)|54
|
||||||
|
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/1396878?v=4' width='36' height='36' alt='@gravyboat'>|[@gravyboat](https://github.com/gravyboat)|41
|
||||||
|
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/242396?v=4' width='36' height='36' alt='@javierbertoli'>|[@javierbertoli](https://github.com/javierbertoli)|19
|
||||||
|
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/3374962?v=4' width='36' height='36' alt='@nmadhok'>|[@nmadhok](https://github.com/nmadhok)|19
|
||||||
|
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/16338056?v=4' width='36' height='36' alt='@vutny'>|[@vutny](https://github.com/vutny)|18
|
||||||
|
<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/528061?v=4' width='36' height='36' alt='@puneetk'>|[@puneetk](https://github.com/puneetk)|11
|
||||||
|
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/745513?v=4' width='36' height='36' alt='@EvaSDK'>|[@EvaSDK](https://github.com/EvaSDK)|9
|
||||||
|
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/1713422?v=4' width='36' height='36' alt='@dferrantelli'>|[@dferrantelli](https://github.com/dferrantelli)|8
|
||||||
|
<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/5306980?v=4' width='36' height='36' alt='@johnkeates'>|[@johnkeates](https://github.com/johnkeates)|8
|
||||||
|
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/91293?v=4' width='36' height='36' alt='@whiteinge'>|[@whiteinge](https://github.com/whiteinge)|8
|
||||||
|
<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/117961?v=4' width='36' height='36' alt='@babilen5'>|[@babilen5](https://github.com/babilen5)|8
|
||||||
|
<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/20441?v=4' width='36' height='36' alt='@iggy'>|[@iggy](https://github.com/iggy)|7
|
||||||
|
<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/13106485?v=4' width='36' height='36' alt='@dynjnelson'>|[@dynjnelson](https://github.com/dynjnelson)|7
|
||||||
|
<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/3449635?v=4' width='36' height='36' alt='@rominf'>|[@rominf](https://github.com/rominf)|7
|
||||||
|
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/223763?v=4' width='36' height='36' alt='@alfredopalhares'>|[@alfredopalhares](https://github.com/alfredopalhares)|6
|
||||||
|
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/1920805?v=4' width='36' height='36' alt='@alxwr'>|[@alxwr](https://github.com/alxwr)|5
|
||||||
|
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/74739?v=4' width='36' height='36' alt='@audreyfeldroy'>|[@audreyfeldroy](https://github.com/audreyfeldroy)|5
|
||||||
|
<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/278900?v=4' width='36' height='36' alt='@blast-hardcheese'>|[@blast-hardcheese](https://github.com/blast-hardcheese)|5
|
||||||
|
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/2179770?v=4' width='36' height='36' alt='@gilou'>|[@gilou](https://github.com/gilou)|5
|
||||||
|
<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/287147?v=4' width='36' height='36' alt='@techhat'>|[@techhat](https://github.com/techhat)|5
|
||||||
|
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/2995329?v=4' width='36' height='36' alt='@t0fik'>|[@t0fik](https://github.com/t0fik)|5
|
||||||
|
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/3768412?v=4' width='36' height='36' alt='@stp-ip'>|[@stp-ip](https://github.com/stp-ip)|4
|
||||||
|
<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/1435085?v=4' width='36' height='36' alt='@blbradley'>|[@blbradley](https://github.com/blbradley)|3
|
||||||
|
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/2192630?v=4' width='36' height='36' alt='@abrefort'>|[@abrefort](https://github.com/abrefort)|3
|
||||||
|
<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/296940?v=4' width='36' height='36' alt='@renoirb'>|[@renoirb](https://github.com/renoirb)|3
|
||||||
|
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/4195158?v=4' width='36' height='36' alt='@dafyddj'>|[@dafyddj](https://github.com/dafyddj)|2
|
||||||
|
<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/1078927?v=4' width='36' height='36' alt='@Ken-2scientists'>|[@Ken-2scientists](https://github.com/Ken-2scientists)|2
|
||||||
|
<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/22311?v=4' width='36' height='36' alt='@madssj'>|[@madssj](https://github.com/madssj)|2
|
||||||
|
<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/102919?v=4' width='36' height='36' alt='@h3'>|[@h3](https://github.com/h3)|2
|
||||||
|
<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/6415605?v=4' width='36' height='36' alt='@tgoodaire'>|[@tgoodaire](https://github.com/tgoodaire)|2
|
||||||
|
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/26276?v=4' width='36' height='36' alt='@durana'>|[@durana](https://github.com/durana)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/1922124?v=4' width='36' height='36' alt='@bebosudo'>|[@bebosudo](https://github.com/bebosudo)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/7353491?v=4' width='36' height='36' alt='@sarcastic-coder'>|[@sarcastic-coder](https://github.com/sarcastic-coder)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/458548?v=4' width='36' height='36' alt='@SuperTux88'>|[@SuperTux88](https://github.com/SuperTux88)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/36720?v=4' width='36' height='36' alt='@brot'>|[@brot](https://github.com/brot)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/1020898?v=4' width='36' height='36' alt='@xbglowx'>|[@xbglowx](https://github.com/xbglowx)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/83323?v=4' width='36' height='36' alt='@cro'>|[@cro](https://github.com/cro)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/8599847?v=4' width='36' height='36' alt='@campbellmc'>|[@campbellmc](https://github.com/campbellmc)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/306240?v=4' width='36' height='36' alt='@UtahDave'>|[@UtahDave](https://github.com/UtahDave)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/215487?v=4' width='36' height='36' alt='@fcrozat'>|[@fcrozat](https://github.com/fcrozat)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/1468874?v=4' width='36' height='36' alt='@Laogeodritt'>|[@Laogeodritt](https://github.com/Laogeodritt)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/650691?v=4' width='36' height='36' alt='@itbabu'>|[@itbabu](https://github.com/itbabu)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/296523?v=4' width='36' height='36' alt='@mkotsbak'>|[@mkotsbak](https://github.com/mkotsbak)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/1331128?v=4' width='36' height='36' alt='@mattysads'>|[@mattysads](https://github.com/mattysads)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/3705387?v=4' width='36' height='36' alt='@mbrannigan'>|[@mbrannigan](https://github.com/mbrannigan)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/3433835?v=4' width='36' height='36' alt='@n-rodriguez'>|[@n-rodriguez](https://github.com/n-rodriguez)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/8399114?v=4' width='36' height='36' alt='@fortunejuggle'>|[@fortunejuggle](https://github.com/fortunejuggle)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/219695?v=4' width='36' height='36' alt='@rmoorman'>|[@rmoorman](https://github.com/rmoorman)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/154676?v=4' width='36' height='36' alt='@skurfer'>|[@skurfer](https://github.com/skurfer)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/2592431?v=4' width='36' height='36' alt='@RobRuana'>|[@RobRuana](https://github.com/RobRuana)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/10464711?v=4' width='36' height='36' alt='@sbrefort'>|[@sbrefort](https://github.com/sbrefort)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/125458?v=4' width='36' height='36' alt='@sbellem'>|[@sbellem](https://github.com/sbellem)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/500703?v=4' width='36' height='36' alt='@retrry'>|[@retrry](https://github.com/retrry)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/2814878?v=4' width='36' height='36' alt='@thomasrossetto'>|[@thomasrossetto](https://github.com/thomasrossetto)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/507599?v=4' width='36' height='36' alt='@thatch45'>|[@thatch45](https://github.com/thatch45)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/444668?v=4' width='36' height='36' alt='@tobio'>|[@tobio](https://github.com/tobio)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/2097647?v=4' width='36' height='36' alt='@XRasher'>|[@XRasher](https://github.com/XRasher)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/8005290?v=4' width='36' height='36' alt='@YetAnotherMinion'>|[@YetAnotherMinion](https://github.com/YetAnotherMinion)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/17393048?v=4' width='36' height='36' alt='@ek9'>|[@ek9](https://github.com/ek9)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/11394644?v=4' width='36' height='36' alt='@Strade288'>|[@Strade288](https://github.com/Strade288)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/46799934?v=4' width='36' height='36' alt='@sticky-note'>|[@sticky-note](https://github.com/sticky-note)|1
|
||||||
|
<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/52996?v=4' width='36' height='36' alt='@daks'>|[@daks](https://github.com/daks)|1
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Auto-generated by a [forked version](https://github.com/myii/maintainer) of [gaocegege/maintainer](https://github.com/gaocegege/maintainer) on 2020-12-16.
|
||||||
289
CHANGELOG.md
Normal file
289
CHANGELOG.md
Normal file
@@ -0,0 +1,289 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
## [0.41.4](https://github.com/saltstack-formulas/postgres-formula/compare/v0.41.3...v0.41.4) (2020-12-16)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **archlinux:** avoid nonetype error ([0a6cf8f](https://github.com/saltstack-formulas/postgres-formula/commit/0a6cf8fefae1bbd5668a447ced911088ac965475))
|
||||||
|
* **archlinux:** use consistent jinja repo check ([3a955e0](https://github.com/saltstack-formulas/postgres-formula/commit/3a955e02708b23929c93f879bcba0e3fe5ae5666))
|
||||||
|
* **jinja:** syntax correction ([8b44c06](https://github.com/saltstack-formulas/postgres-formula/commit/8b44c068fcfd4199336596bdba095fc0e6c8fb2e))
|
||||||
|
* **python:** use python3 postres on cent7/8 ([d6d1068](https://github.com/saltstack-formulas/postgres-formula/commit/d6d1068395131de08534e387d377389bd078d3ee))
|
||||||
|
* **suse:** version 11+ repo support on suse ([b3f381e](https://github.com/saltstack-formulas/postgres-formula/commit/b3f381e54750a00bb19a4aa50c6273c627dca16c))
|
||||||
|
|
||||||
|
|
||||||
|
### Continuous Integration
|
||||||
|
|
||||||
|
* **gitlab-ci:** use GitLab CI as Travis CI replacement ([a45673a](https://github.com/saltstack-formulas/postgres-formula/commit/a45673a87892deb973afee3689aea4bebd7a5739))
|
||||||
|
* **pre-commit:** add to formula [skip ci] ([db1794b](https://github.com/saltstack-formulas/postgres-formula/commit/db1794b6bbb6ce183e5231cb4b7e7193dcb80143))
|
||||||
|
* **pre-commit:** enable/disable `rstcheck` as relevant [skip ci] ([f04d60a](https://github.com/saltstack-formulas/postgres-formula/commit/f04d60a773461dce98b4f2a7c8abbbab268513a0))
|
||||||
|
* **pre-commit:** finalise `rstcheck` configuration [skip ci] ([7036f60](https://github.com/saltstack-formulas/postgres-formula/commit/7036f60e8ca3857beeca18abe70a3c59b6a021ec))
|
||||||
|
|
||||||
|
## [0.41.3](https://github.com/saltstack-formulas/postgres-formula/compare/v0.41.2...v0.41.3) (2020-09-29)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **upstream:** require_in/require use_upstream ([ab6b97e](https://github.com/saltstack-formulas/postgres-formula/commit/ab6b97e8c3ff40f9cb2e629c3c0faf09ca59ede9))
|
||||||
|
|
||||||
|
## [0.41.2](https://github.com/saltstack-formulas/postgres-formula/compare/v0.41.1...v0.41.2) (2020-07-27)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **macros:** fix `format_kwargs` macro ([5e6511b](https://github.com/saltstack-formulas/postgres-formula/commit/5e6511b783388930010e6c0795b197728fb10b39))
|
||||||
|
|
||||||
|
|
||||||
|
### Continuous Integration
|
||||||
|
|
||||||
|
* **kitchen:** ubuntu-2004-master-py3 added ([7978976](https://github.com/saltstack-formulas/postgres-formula/commit/79789765439bb0727521dc817fe9eaebba000a67))
|
||||||
|
* **kitchen+travis:** use latest pre-salted images [skip ci] ([702323c](https://github.com/saltstack-formulas/postgres-formula/commit/702323c24df1df6b11defd663b55cf38586bd3f3))
|
||||||
|
* **travis:** ubuntu upgrade from 16 to 18 & 20 ([44568a6](https://github.com/saltstack-formulas/postgres-formula/commit/44568a680602fb61f157b74dc05f9af9b153e8e6))
|
||||||
|
|
||||||
|
|
||||||
|
### Styles
|
||||||
|
|
||||||
|
* **libtofs.jinja:** use Black-inspired Jinja formatting [skip ci] ([8735cf8](https://github.com/saltstack-formulas/postgres-formula/commit/8735cf8ad1b9fc1eb816aecf3d363d4fc81fbe66))
|
||||||
|
|
||||||
|
## [0.41.1](https://github.com/saltstack-formulas/postgres-formula/compare/v0.41.0...v0.41.1) (2020-07-10)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **contributing:** postgresql-repo state ID requires python3-apt package ([69b57e3](https://github.com/saltstack-formulas/postgres-formula/commit/69b57e3b69062d0b66bd9fb28e3769a9ff579faa))
|
||||||
|
* **contributing:** postgresql-service-reload type ([278893c](https://github.com/saltstack-formulas/postgres-formula/commit/278893c2f0f3fa8db26b45b3874f7dd7177b714a))
|
||||||
|
* **contributing:** runnig formula inside container ([68a791e](https://github.com/saltstack-formulas/postgres-formula/commit/68a791ef091114b081f71631d94201a9f1ed07b6))
|
||||||
|
* **libtofs:** “files_switch” mess up the variable exported by “map.jinja” [skip ci] ([e6b1485](https://github.com/saltstack-formulas/postgres-formula/commit/e6b14853d5ce2369ead22cabdfc48ae63f64e550))
|
||||||
|
* **postgres.server:** reverted how posrgre.server.image is included ([07044bf](https://github.com/saltstack-formulas/postgres-formula/commit/07044bf7c1d420855b43d6add30358ff39666702))
|
||||||
|
|
||||||
|
|
||||||
|
### Continuous Integration
|
||||||
|
|
||||||
|
* **gemfile:** remove unused `rspec-retry` gem [skip ci] ([85feac2](https://github.com/saltstack-formulas/postgres-formula/commit/85feac2852ee399f37293b60008e3a17d19cd47f))
|
||||||
|
* **gemfile:** update for Vagrant testing [skip ci] ([061715e](https://github.com/saltstack-formulas/postgres-formula/commit/061715e560880a9a60720bbcbeda632c010d03a4))
|
||||||
|
* **gemfile.lock:** add to repo with updated `Gemfile` [skip ci] ([35850da](https://github.com/saltstack-formulas/postgres-formula/commit/35850da22cb4f61144a61098b9869603b6e0a682))
|
||||||
|
* **kitchen:** avoid using bootstrap for `master` instances [skip ci] ([86697d8](https://github.com/saltstack-formulas/postgres-formula/commit/86697d8df48e24e37d6885f68ea8988d43b076aa))
|
||||||
|
* **kitchen:** use `saltimages` Docker Hub where available [skip ci] ([5e29999](https://github.com/saltstack-formulas/postgres-formula/commit/5e29999495f36653aa1b51f2baf956533fdee7e4))
|
||||||
|
* **kitchen+travis:** remove `master-py2-arch-base-latest` [skip ci] ([c46053a](https://github.com/saltstack-formulas/postgres-formula/commit/c46053abd8019a4229daf19db1af86c5f8961353))
|
||||||
|
* **travis:** add notifications => zulip [skip ci] ([442cfec](https://github.com/saltstack-formulas/postgres-formula/commit/442cfec245fb6b22d7768c8436ba6c62ca2975fd))
|
||||||
|
* **workflows/commitlint:** add to repo [skip ci] ([0c766c8](https://github.com/saltstack-formulas/postgres-formula/commit/0c766c8e2e336e31d44fdddf5f4c5e56faa9e40e))
|
||||||
|
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
|
||||||
|
* **container:** "postgres:bake_image" specifics ([904a525](https://github.com/saltstack-formulas/postgres-formula/commit/904a5258cd155f3b5a83ec8dc8e990a8ffc6b798))
|
||||||
|
|
||||||
|
# [0.41.0](https://github.com/saltstack-formulas/postgres-formula/compare/v0.40.5...v0.41.0) (2019-12-27)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **mac_shortcut.sh:** fix `shellcheck` error ([d538798](https://github.com/saltstack-formulas/postgres-formula/commit/d538798ee4423ecb72b29bd39e4f35437412ce43))
|
||||||
|
* **release.config.js:** use full commit hash in commit link [skip ci] ([f3ec66d](https://github.com/saltstack-formulas/postgres-formula/commit/f3ec66d5ed90bc9a458fdff2233c9a707f0c9c72))
|
||||||
|
|
||||||
|
|
||||||
|
### Continuous Integration
|
||||||
|
|
||||||
|
* **gemfile:** restrict `train` gem version until upstream fix [skip ci] ([a77bb06](https://github.com/saltstack-formulas/postgres-formula/commit/a77bb06b18823c7db0debd2c4ff135a367f76d04))
|
||||||
|
* **kitchen:** use `develop` image until `master` is ready (`amazonlinux`) [skip ci] ([20e5e46](https://github.com/saltstack-formulas/postgres-formula/commit/20e5e46e1011641714a11756617530b898e3d689))
|
||||||
|
* **kitchen+travis:** upgrade matrix after `2019.2.2` release [skip ci] ([8080be6](https://github.com/saltstack-formulas/postgres-formula/commit/8080be6be3dd0c8799fa102b1235fb151514bced))
|
||||||
|
* **travis:** apply changes from build config validation [skip ci] ([8ce1ee4](https://github.com/saltstack-formulas/postgres-formula/commit/8ce1ee4ecc5dd6a6a14118eda75b3446b6f58d82))
|
||||||
|
* **travis:** opt-in to `dpl v2` to complete build config validation [skip ci] ([bd5959c](https://github.com/saltstack-formulas/postgres-formula/commit/bd5959c60a93e65ea0658f5cb7fd1609bdd3399c))
|
||||||
|
* **travis:** quote pathspecs used with `git ls-files` [skip ci] ([0a2b63a](https://github.com/saltstack-formulas/postgres-formula/commit/0a2b63aba85b09c8983d066cbad7e344de791db1))
|
||||||
|
* **travis:** run `shellcheck` during lint job [skip ci] ([f0d12ca](https://github.com/saltstack-formulas/postgres-formula/commit/f0d12caac67bf7f2049ca7f1b7185912e876cb02))
|
||||||
|
* **travis:** use `major.minor` for `semantic-release` version [skip ci] ([1392538](https://github.com/saltstack-formulas/postgres-formula/commit/1392538665bea2a699836a87a6b749e07276a94d))
|
||||||
|
* **travis:** use build config validation (beta) [skip ci] ([c9a57aa](https://github.com/saltstack-formulas/postgres-formula/commit/c9a57aa96bb80dc27c4722e0f8dc45c77460c03a))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **codenamemap:** update for current versions ([9cc95c0](https://github.com/saltstack-formulas/postgres-formula/commit/9cc95c020909563486f404b186e15ed71dd8a83a))
|
||||||
|
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* **travis:** improve `salt-lint` invocation [skip ci] ([ccaf4e5](https://github.com/saltstack-formulas/postgres-formula/commit/ccaf4e5e3729c75c3a5eccbf482e7fca09415fea))
|
||||||
|
|
||||||
|
## [0.40.5](https://github.com/saltstack-formulas/postgres-formula/compare/v0.40.4...v0.40.5) (2019-10-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **macros.jinja:** apply suggestion from PR ([](https://github.com/saltstack-formulas/postgres-formula/commit/d606b28))
|
||||||
|
* **macros.jinja:** use `user` kwarg for schemas (required on FreeBSD) ([](https://github.com/saltstack-formulas/postgres-formula/commit/7ff798a))
|
||||||
|
|
||||||
|
|
||||||
|
### Continuous Integration
|
||||||
|
|
||||||
|
* **kitchen:** add pre-salted `FreeBSD-12.0` box for local testing ([](https://github.com/saltstack-formulas/postgres-formula/commit/eefb89e))
|
||||||
|
* **kitchen:** use `debian-10-master-py3` instead of `develop` [skip ci] ([](https://github.com/saltstack-formulas/postgres-formula/commit/81b2c2e))
|
||||||
|
* **travis:** update `salt-lint` config for `v0.0.10` [skip ci] ([](https://github.com/saltstack-formulas/postgres-formula/commit/62baac2))
|
||||||
|
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
|
||||||
|
* **contributing:** remove to use org-level file instead [skip ci] ([](https://github.com/saltstack-formulas/postgres-formula/commit/5a291ab))
|
||||||
|
* **readme:** update link to `CONTRIBUTING` [skip ci] ([](https://github.com/saltstack-formulas/postgres-formula/commit/e568f28))
|
||||||
|
|
||||||
|
## [0.40.4](https://github.com/saltstack-formulas/postgres-formula/compare/v0.40.3...v0.40.4) (2019-10-11)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **rubocop:** add fixes using `rubocop --safe-auto-correct` ([](https://github.com/saltstack-formulas/postgres-formula/commit/37b0c43))
|
||||||
|
* **rubocop:** fix remaining errors manually ([](https://github.com/saltstack-formulas/postgres-formula/commit/b369aa9))
|
||||||
|
|
||||||
|
|
||||||
|
### Continuous Integration
|
||||||
|
|
||||||
|
* merge travis matrix, add `salt-lint` & `rubocop` to `lint` job ([](https://github.com/saltstack-formulas/postgres-formula/commit/7822200))
|
||||||
|
* **travis:** merge `rubocop` linter into main `lint` job ([](https://github.com/saltstack-formulas/postgres-formula/commit/2c82872))
|
||||||
|
|
||||||
|
## [0.40.3](https://github.com/saltstack-formulas/postgres-formula/compare/v0.40.2...v0.40.3) (2019-10-10)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **manage.sls:** fix `salt-lint` errors ([](https://github.com/saltstack-formulas/postgres-formula/commit/bf5b4d6))
|
||||||
|
* **python.sls:** fix `salt-lint` errors ([](https://github.com/saltstack-formulas/postgres-formula/commit/1f3cfcc))
|
||||||
|
|
||||||
|
|
||||||
|
### Continuous Integration
|
||||||
|
|
||||||
|
* **kitchen:** change `log_level` to `debug` instead of `info` ([](https://github.com/saltstack-formulas/postgres-formula/commit/7ca61f3))
|
||||||
|
* **kitchen:** install required packages to bootstrapped `opensuse` [skip ci] ([](https://github.com/saltstack-formulas/postgres-formula/commit/76e3e39))
|
||||||
|
* **kitchen:** use bootstrapped `opensuse` images until `2019.2.2` [skip ci] ([](https://github.com/saltstack-formulas/postgres-formula/commit/3a27978))
|
||||||
|
* **platform:** add `arch-base-latest` (commented out for now) [skip ci] ([](https://github.com/saltstack-formulas/postgres-formula/commit/89e4a34))
|
||||||
|
* merge travis matrix, add `salt-lint` & `rubocop` to `lint` job ([](https://github.com/saltstack-formulas/postgres-formula/commit/a0fdd48))
|
||||||
|
|
||||||
|
## [0.40.2](https://github.com/saltstack-formulas/postgres-formula/compare/v0.40.1...v0.40.2) (2019-09-13)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **freebsd:** no libpqdev freebsd package ([eca6d97](https://github.com/saltstack-formulas/postgres-formula/commit/eca6d97))
|
||||||
|
|
||||||
|
|
||||||
|
### Continuous Integration
|
||||||
|
|
||||||
|
* **yamllint:** add rule `empty-values` & use new `yaml-files` setting ([9796319](https://github.com/saltstack-formulas/postgres-formula/commit/9796319))
|
||||||
|
|
||||||
|
## [0.40.1](https://github.com/saltstack-formulas/postgres-formula/compare/v0.40.0...v0.40.1) (2019-09-11)
|
||||||
|
|
||||||
|
|
||||||
|
### Continuous Integration
|
||||||
|
|
||||||
|
* use `dist: bionic` & apply `opensuse-leap-15` SCP error workaround ([fc6cbe0](https://github.com/saltstack-formulas/postgres-formula/commit/fc6cbe0))
|
||||||
|
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
|
||||||
|
* **pillar.example:** update examples for freebsd ([a799214](https://github.com/saltstack-formulas/postgres-formula/commit/a799214))
|
||||||
|
|
||||||
|
# [0.40.0](https://github.com/saltstack-formulas/postgres-formula/compare/v0.39.1...v0.40.0) (2019-09-03)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **archlinux:** add support, fixing rendering errors ([e970925](https://github.com/saltstack-formulas/postgres-formula/commit/e970925))
|
||||||
|
|
||||||
|
## [0.39.1](https://github.com/saltstack-formulas/postgres-formula/compare/v0.39.0...v0.39.1) (2019-09-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Continuous Integration
|
||||||
|
|
||||||
|
* **kitchen+travis:** replace EOL pre-salted images ([140928b](https://github.com/saltstack-formulas/postgres-formula/commit/140928b))
|
||||||
|
|
||||||
|
|
||||||
|
### Tests
|
||||||
|
|
||||||
|
* **inspec:** fix reference to `suse` after gem `train` update ([677adba](https://github.com/saltstack-formulas/postgres-formula/commit/677adba))
|
||||||
|
|
||||||
|
# [0.39.0](https://github.com/saltstack-formulas/postgres-formula/compare/v0.38.0...v0.39.0) (2019-08-17)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **yamllint:** include for this repo and apply rules throughout ([1f0fd92](https://github.com/saltstack-formulas/postgres-formula/commit/1f0fd92))
|
||||||
|
|
||||||
|
# [0.38.0](https://github.com/saltstack-formulas/postgres-formula/compare/v0.37.4...v0.38.0) (2019-07-24)
|
||||||
|
|
||||||
|
|
||||||
|
### Continuous Integration
|
||||||
|
|
||||||
|
* **kitchen:** remove `python*-pip` installation ([d999597](https://github.com/saltstack-formulas/postgres-formula/commit/d999597))
|
||||||
|
* **kitchen+travis:** modify matrix to include `develop` platform ([3f81439](https://github.com/saltstack-formulas/postgres-formula/commit/3f81439))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **debian:** add buster support ([904ba27](https://github.com/saltstack-formulas/postgres-formula/commit/904ba27))
|
||||||
|
|
||||||
|
## [0.37.4](https://github.com/saltstack-formulas/postgres-formula/compare/v0.37.3...v0.37.4) (2019-05-31)
|
||||||
|
|
||||||
|
|
||||||
|
### Continuous Integration
|
||||||
|
|
||||||
|
* **travis:** reduce matrix down to 6 instances ([2ff919f](https://github.com/saltstack-formulas/postgres-formula/commit/2ff919f))
|
||||||
|
|
||||||
|
|
||||||
|
### Tests
|
||||||
|
|
||||||
|
* **`services_spec`:** remove temporary `suse` conditional ([81165fc](https://github.com/saltstack-formulas/postgres-formula/commit/81165fc))
|
||||||
|
* **command_spec:** use cleaner `match` string using `%r` ([a054cea](https://github.com/saltstack-formulas/postgres-formula/commit/a054cea))
|
||||||
|
* **locale:** improve test using locale `en_US.UTF-8` ([7796064](https://github.com/saltstack-formulas/postgres-formula/commit/7796064))
|
||||||
|
|
||||||
|
## [0.37.3](https://github.com/saltstack-formulas/postgres-formula/compare/v0.37.2...v0.37.3) (2019-05-16)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **freebsd-user:** fix FreeBSD daemon's user for PostgreSQL >= 9.6 ([8745365](https://github.com/saltstack-formulas/postgres-formula/commit/8745365)), closes [#263](https://github.com/saltstack-formulas/postgres-formula/issues/263)
|
||||||
|
|
||||||
|
## [0.37.2](https://github.com/saltstack-formulas/postgres-formula/compare/v0.37.1...v0.37.2) (2019-05-12)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **sysrc-svc:** workaround *BSD minion indefinitely hanging on start ([0aa8b4a](https://github.com/saltstack-formulas/postgres-formula/commit/0aa8b4a))
|
||||||
|
|
||||||
|
## [0.37.1](https://github.com/saltstack-formulas/postgres-formula/compare/v0.37.0...v0.37.1) (2019-05-06)
|
||||||
|
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
|
||||||
|
* **readme:** fix link for Travis badge ([850ca6a](https://github.com/saltstack-formulas/postgres-formula/commit/850ca6a))
|
||||||
|
|
||||||
|
# [0.37.0](https://github.com/saltstack-formulas/postgres-formula/compare/v0.36.0...v0.37.0) (2019-05-06)
|
||||||
|
|
||||||
|
|
||||||
|
### Code Refactoring
|
||||||
|
|
||||||
|
* **kitchen:** prefer `kitchen.yml` to `.kitchen.yml` ([8f7cbde](https://github.com/saltstack-formulas/postgres-formula/commit/8f7cbde))
|
||||||
|
|
||||||
|
|
||||||
|
### Continuous Integration
|
||||||
|
|
||||||
|
* **gemfile:** prepare for `inspec` testing ([157e169](https://github.com/saltstack-formulas/postgres-formula/commit/157e169))
|
||||||
|
* **kitchen:** use pre-salted images as used in `template-formula` ([611ec11](https://github.com/saltstack-formulas/postgres-formula/commit/611ec11))
|
||||||
|
* **kitchen+travis:** use newly available pre-salted images ([7b7aadc](https://github.com/saltstack-formulas/postgres-formula/commit/7b7aadc))
|
||||||
|
* **pillar_from_files:** use custom pillar based on `pillar.example` ([c64d9e4](https://github.com/saltstack-formulas/postgres-formula/commit/c64d9e4))
|
||||||
|
* **travis:** add `.travis.yml` based on `template-formula` ([6467df7](https://github.com/saltstack-formulas/postgres-formula/commit/6467df7))
|
||||||
|
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
|
||||||
|
* **readme:** update `Testing` section for `inspec` ([4cfde8d](https://github.com/saltstack-formulas/postgres-formula/commit/4cfde8d))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* implement `semantic-release` ([7d3aa19](https://github.com/saltstack-formulas/postgres-formula/commit/7d3aa19))
|
||||||
|
|
||||||
|
|
||||||
|
### Tests
|
||||||
|
|
||||||
|
* **inspec:** add tests for multiple ports and postgres versions ([bf6a653](https://github.com/saltstack-formulas/postgres-formula/commit/bf6a653))
|
||||||
|
* **inspec:** enable `use_upstream_repo` for `debian` & `centos-6` ([49fdd33](https://github.com/saltstack-formulas/postgres-formula/commit/49fdd33))
|
||||||
|
* **inspec:** replace `serverspec` with `inspec` tests ([58ac122](https://github.com/saltstack-formulas/postgres-formula/commit/58ac122))
|
||||||
|
* **inspec:** use relaxed command output match for the time being ([3c53684](https://github.com/saltstack-formulas/postgres-formula/commit/3c53684))
|
||||||
44
CODEOWNERS
Normal file
44
CODEOWNERS
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
|
||||||
|
|
||||||
|
# SECTION: Owner(s) for everything in the repo, unless a later match takes precedence
|
||||||
|
# FILE PATTERN OWNER(S)
|
||||||
|
* @vutny @myii
|
||||||
|
|
||||||
|
# SECTION: Owner(s) for specific directories
|
||||||
|
# FILE PATTERN OWNER(S)
|
||||||
|
|
||||||
|
# SECTION: Owner(s) for files/directories related to `semantic-release`
|
||||||
|
# FILE PATTERN OWNER(S)
|
||||||
|
/.github/workflows/ @saltstack-formulas/ssf
|
||||||
|
/bin/install-hooks @saltstack-formulas/ssf
|
||||||
|
/bin/kitchen @saltstack-formulas/ssf
|
||||||
|
/docs/AUTHORS.rst @saltstack-formulas/ssf
|
||||||
|
/docs/CHANGELOG.rst @saltstack-formulas/ssf
|
||||||
|
/docs/TOFS_pattern.rst @saltstack-formulas/ssf
|
||||||
|
/*/libsaltcli.jinja @saltstack-formulas/ssf
|
||||||
|
/*/libtofs.jinja @saltstack-formulas/ssf
|
||||||
|
/test/integration/**/inspec.yml @saltstack-formulas/ssf
|
||||||
|
/test/integration/**/README.md @saltstack-formulas/ssf
|
||||||
|
/.gitignore @saltstack-formulas/ssf
|
||||||
|
/.cirrus.yml @saltstack-formulas/ssf
|
||||||
|
/.gitlab-ci.yml @saltstack-formulas/ssf
|
||||||
|
/.pre-commit-config.yaml @saltstack-formulas/ssf
|
||||||
|
/.rstcheck.cfg @saltstack-formulas/ssf
|
||||||
|
/.rubocop.yml @saltstack-formulas/ssf
|
||||||
|
/.salt-lint @saltstack-formulas/ssf
|
||||||
|
/.travis.yml @saltstack-formulas/ssf
|
||||||
|
/.yamllint @saltstack-formulas/ssf
|
||||||
|
/AUTHORS.md @saltstack-formulas/ssf
|
||||||
|
/CHANGELOG.md @saltstack-formulas/ssf
|
||||||
|
/CODEOWNERS @saltstack-formulas/ssf
|
||||||
|
/commitlint.config.js @saltstack-formulas/ssf
|
||||||
|
/FORMULA @saltstack-formulas/ssf
|
||||||
|
/Gemfile @saltstack-formulas/ssf
|
||||||
|
/Gemfile.lock @saltstack-formulas/ssf
|
||||||
|
/kitchen.yml @saltstack-formulas/ssf
|
||||||
|
/pre-commit_semantic-release.sh @saltstack-formulas/ssf
|
||||||
|
/release-rules.js @saltstack-formulas/ssf
|
||||||
|
/release.config.js @saltstack-formulas/ssf
|
||||||
|
|
||||||
|
# SECTION: Owner(s) for specific files
|
||||||
|
# FILE PATTERN OWNER(S)
|
||||||
9
FORMULA
Normal file
9
FORMULA
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
name: postgres
|
||||||
|
os: Debian, Ubuntu, Raspbian, RedHat, Fedora, CentOS, Suse, openSUSE, Gentoo, Funtoo, Arch, Manjaro, Alpine, FreeBSD, OpenBSD, Solaris, SmartOS, Windows, MacOS
|
||||||
|
os_family: Debian, RedHat, Suse, Gentoo, Arch, Alpine, FreeBSD, OpenBSD, Solaris, Windows, MacOS
|
||||||
|
version: 0.41.4
|
||||||
|
release: 1
|
||||||
|
minimum_version: 2016.11
|
||||||
|
summary: Postgres formula
|
||||||
|
description: Formula to install and configure PostgreSQL
|
||||||
|
top_level_dir: postgres
|
||||||
19
Gemfile
19
Gemfile
@@ -1,5 +1,16 @@
|
|||||||
source "https://rubygems.org"
|
# frozen_string_literal: true
|
||||||
|
|
||||||
gem "test-kitchen", "> 1.2.0"
|
source 'https://rubygems.org'
|
||||||
gem "kitchen-vagrant"
|
|
||||||
gem "kitchen-salt"
|
# Use the latest version of `inspec` prior to `4.23.4`, which introduces a
|
||||||
|
# regression where the diff isn't displayed when comparing using `eq`.
|
||||||
|
gem 'inspec', '~> 4.22.22'
|
||||||
|
# Install the `kitchen-docker` gem from GitHub because the latest version
|
||||||
|
# currently available (`2.10.0`) doesn't include a recent fix for Gentoo.
|
||||||
|
gem 'kitchen-docker', github: 'test-kitchen/kitchen-docker', ref: '41e80fe'
|
||||||
|
gem 'kitchen-inspec', '>= 2.2.1'
|
||||||
|
gem 'kitchen-salt', '>= 0.6.3'
|
||||||
|
|
||||||
|
group :vagrant do
|
||||||
|
gem 'kitchen-vagrant'
|
||||||
|
end
|
||||||
|
|||||||
541
Gemfile.lock
541
Gemfile.lock
@@ -1,26 +1,533 @@
|
|||||||
|
GIT
|
||||||
|
remote: https://github.com/test-kitchen/kitchen-docker.git
|
||||||
|
revision: 41e80fed3a7cc86323e19c16a5a340cebf7e5848
|
||||||
|
ref: 41e80fe
|
||||||
|
specs:
|
||||||
|
kitchen-docker (2.10.0)
|
||||||
|
test-kitchen (>= 1.0.0)
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
kitchen-salt (0.0.19)
|
activesupport (5.2.4.4)
|
||||||
kitchen-vagrant (0.15.0)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
test-kitchen (~> 1.0)
|
i18n (>= 0.7, < 2)
|
||||||
mixlib-shellout (2.0.1)
|
minitest (~> 5.1)
|
||||||
net-scp (1.2.1)
|
tzinfo (~> 1.1)
|
||||||
net-ssh (>= 2.6.5)
|
addressable (2.7.0)
|
||||||
net-ssh (2.9.2)
|
public_suffix (>= 2.0.2, < 5.0)
|
||||||
safe_yaml (1.0.4)
|
aws-eventstream (1.1.0)
|
||||||
test-kitchen (1.3.1)
|
aws-partitions (1.386.0)
|
||||||
mixlib-shellout (>= 1.2, < 3.0)
|
aws-sdk-apigateway (1.55.0)
|
||||||
net-scp (~> 1.1)
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
net-ssh (~> 2.7)
|
aws-sigv4 (~> 1.1)
|
||||||
safe_yaml (~> 1.0)
|
aws-sdk-apigatewayv2 (1.29.0)
|
||||||
thor (~> 0.18)
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
thor (0.19.1)
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-athena (1.33.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-autoscaling (1.22.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.52.1)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-budgets (1.36.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-cloudformation (1.44.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-cloudfront (1.46.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-cloudhsm (1.27.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-cloudhsmv2 (1.30.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-cloudtrail (1.29.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-cloudwatch (1.45.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-cloudwatchlogs (1.38.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-codecommit (1.40.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-codedeploy (1.37.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-codepipeline (1.37.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-configservice (1.53.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-core (3.109.1)
|
||||||
|
aws-eventstream (~> 1, >= 1.0.2)
|
||||||
|
aws-partitions (~> 1, >= 1.239.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
jmespath (~> 1.0)
|
||||||
|
aws-sdk-costandusagereportservice (1.28.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-dynamodb (1.55.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-ec2 (1.202.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-ecr (1.39.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-ecs (1.70.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-efs (1.36.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-eks (1.45.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-elasticache (1.44.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-elasticbeanstalk (1.39.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-elasticloadbalancing (1.29.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-elasticloadbalancingv2 (1.53.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-elasticsearchservice (1.43.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-firehose (1.35.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-guardduty (1.42.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-iam (1.46.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-kafka (1.29.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-kinesis (1.30.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-kms (1.39.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-lambda (1.51.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-organizations (1.17.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.39.0)
|
||||||
|
aws-sigv4 (~> 1.0)
|
||||||
|
aws-sdk-rds (1.104.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-redshift (1.50.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-route53 (1.44.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-route53domains (1.28.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-route53resolver (1.21.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-s3 (1.83.1)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sdk-kms (~> 1)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-securityhub (1.35.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-ses (1.36.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-sms (1.27.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-sns (1.34.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-sqs (1.34.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sdk-ssm (1.95.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.109.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sigv4 (1.2.2)
|
||||||
|
aws-eventstream (~> 1, >= 1.0.2)
|
||||||
|
azure_graph_rbac (0.17.2)
|
||||||
|
ms_rest_azure (~> 0.12.0)
|
||||||
|
azure_mgmt_key_vault (0.17.6)
|
||||||
|
ms_rest_azure (~> 0.12.0)
|
||||||
|
azure_mgmt_resources (0.18.0)
|
||||||
|
ms_rest_azure (~> 0.12.0)
|
||||||
|
azure_mgmt_security (0.18.2)
|
||||||
|
ms_rest_azure (~> 0.12.0)
|
||||||
|
azure_mgmt_storage (0.22.0)
|
||||||
|
ms_rest_azure (~> 0.12.0)
|
||||||
|
bcrypt_pbkdf (1.0.1)
|
||||||
|
builder (3.2.4)
|
||||||
|
chef-config (16.6.14)
|
||||||
|
addressable
|
||||||
|
chef-utils (= 16.6.14)
|
||||||
|
fuzzyurl
|
||||||
|
mixlib-config (>= 2.2.12, < 4.0)
|
||||||
|
mixlib-shellout (>= 2.0, < 4.0)
|
||||||
|
tomlrb (~> 1.2)
|
||||||
|
chef-telemetry (1.0.14)
|
||||||
|
chef-config
|
||||||
|
concurrent-ruby (~> 1.0)
|
||||||
|
ffi-yajl (~> 2.2)
|
||||||
|
chef-utils (16.6.14)
|
||||||
|
coderay (1.1.3)
|
||||||
|
concurrent-ruby (1.1.7)
|
||||||
|
declarative (0.0.20)
|
||||||
|
declarative-option (0.1.0)
|
||||||
|
diff-lcs (1.4.4)
|
||||||
|
docker-api (2.0.0)
|
||||||
|
excon (>= 0.47.0)
|
||||||
|
multi_json
|
||||||
|
domain_name (0.5.20190701)
|
||||||
|
unf (>= 0.0.5, < 1.0.0)
|
||||||
|
ecma-re-validator (0.2.1)
|
||||||
|
regexp_parser (~> 1.2)
|
||||||
|
ed25519 (1.2.4)
|
||||||
|
erubi (1.9.0)
|
||||||
|
excon (0.78.0)
|
||||||
|
faraday (0.17.3)
|
||||||
|
multipart-post (>= 1.2, < 3)
|
||||||
|
faraday-cookie_jar (0.0.7)
|
||||||
|
faraday (>= 0.8.0)
|
||||||
|
http-cookie (~> 1.0.0)
|
||||||
|
faraday_middleware (0.12.2)
|
||||||
|
faraday (>= 0.7.4, < 1.0)
|
||||||
|
ffi (1.13.1)
|
||||||
|
ffi-yajl (2.3.4)
|
||||||
|
libyajl2 (~> 1.2)
|
||||||
|
fuzzyurl (0.9.0)
|
||||||
|
google-api-client (0.44.0)
|
||||||
|
addressable (~> 2.5, >= 2.5.1)
|
||||||
|
googleauth (~> 0.9)
|
||||||
|
httpclient (>= 2.8.1, < 3.0)
|
||||||
|
mini_mime (~> 1.0)
|
||||||
|
representable (~> 3.0)
|
||||||
|
retriable (>= 2.0, < 4.0)
|
||||||
|
signet (~> 0.12)
|
||||||
|
googleauth (0.13.0)
|
||||||
|
faraday (>= 0.17.3, < 2.0)
|
||||||
|
jwt (>= 1.4, < 3.0)
|
||||||
|
memoist (~> 0.16)
|
||||||
|
multi_json (~> 1.11)
|
||||||
|
os (>= 0.9, < 2.0)
|
||||||
|
signet (~> 0.14)
|
||||||
|
gssapi (1.3.0)
|
||||||
|
ffi (>= 1.0.1)
|
||||||
|
gyoku (1.3.1)
|
||||||
|
builder (>= 2.1.2)
|
||||||
|
hana (1.3.6)
|
||||||
|
hashie (3.6.0)
|
||||||
|
http-cookie (1.0.3)
|
||||||
|
domain_name (~> 0.5)
|
||||||
|
httpclient (2.8.3)
|
||||||
|
i18n (1.8.5)
|
||||||
|
concurrent-ruby (~> 1.0)
|
||||||
|
inifile (3.0.0)
|
||||||
|
inspec (4.22.22)
|
||||||
|
faraday_middleware (~> 0.12.2)
|
||||||
|
inspec-core (= 4.22.22)
|
||||||
|
train (~> 3.0)
|
||||||
|
train-aws (~> 0.1)
|
||||||
|
train-habitat (~> 0.1)
|
||||||
|
train-winrm (~> 0.2)
|
||||||
|
inspec-core (4.22.22)
|
||||||
|
addressable (~> 2.4)
|
||||||
|
chef-telemetry (~> 1.0)
|
||||||
|
faraday (>= 0.9.0)
|
||||||
|
hashie (~> 3.4)
|
||||||
|
json_schemer (>= 0.2.1, < 0.2.12)
|
||||||
|
license-acceptance (>= 0.2.13, < 2.0)
|
||||||
|
method_source (>= 0.8, < 2.0)
|
||||||
|
mixlib-log (~> 3.0)
|
||||||
|
multipart-post (~> 2.0)
|
||||||
|
parallel (~> 1.9)
|
||||||
|
parslet (~> 1.5)
|
||||||
|
pry (~> 0.13)
|
||||||
|
rspec (~> 3.9)
|
||||||
|
rspec-its (~> 1.2)
|
||||||
|
rubyzip (~> 1.2, >= 1.2.2)
|
||||||
|
semverse (~> 3.0)
|
||||||
|
sslshake (~> 1.2)
|
||||||
|
thor (>= 0.20, < 2.0)
|
||||||
|
tomlrb (~> 1.2.0)
|
||||||
|
train-core (~> 3.0)
|
||||||
|
tty-prompt (~> 0.17)
|
||||||
|
tty-table (~> 0.10)
|
||||||
|
jmespath (1.4.0)
|
||||||
|
json (2.3.1)
|
||||||
|
json_schemer (0.2.11)
|
||||||
|
ecma-re-validator (~> 0.2)
|
||||||
|
hana (~> 1.3)
|
||||||
|
regexp_parser (~> 1.5)
|
||||||
|
uri_template (~> 0.7)
|
||||||
|
jwt (2.2.2)
|
||||||
|
kitchen-inspec (2.2.1)
|
||||||
|
hashie (~> 3.4)
|
||||||
|
inspec (>= 2.2.64, < 5.0)
|
||||||
|
test-kitchen (>= 2.7, < 3)
|
||||||
|
kitchen-salt (0.6.3)
|
||||||
|
hashie (>= 3.5)
|
||||||
|
test-kitchen (>= 1.4)
|
||||||
|
kitchen-vagrant (1.7.0)
|
||||||
|
test-kitchen (>= 1.4, < 3)
|
||||||
|
libyajl2 (1.2.0)
|
||||||
|
license-acceptance (1.0.19)
|
||||||
|
pastel (~> 0.7)
|
||||||
|
tomlrb (~> 1.2)
|
||||||
|
tty-box (~> 0.3)
|
||||||
|
tty-prompt (~> 0.18)
|
||||||
|
little-plugger (1.1.4)
|
||||||
|
logging (2.3.0)
|
||||||
|
little-plugger (~> 1.1)
|
||||||
|
multi_json (~> 1.14)
|
||||||
|
memoist (0.16.2)
|
||||||
|
method_source (1.0.0)
|
||||||
|
mini_mime (1.0.2)
|
||||||
|
minitest (5.14.2)
|
||||||
|
mixlib-config (3.0.9)
|
||||||
|
tomlrb
|
||||||
|
mixlib-install (3.12.3)
|
||||||
|
mixlib-shellout
|
||||||
|
mixlib-versioning
|
||||||
|
thor
|
||||||
|
mixlib-log (3.0.9)
|
||||||
|
mixlib-shellout (3.1.6)
|
||||||
|
chef-utils
|
||||||
|
mixlib-versioning (1.2.12)
|
||||||
|
ms_rest (0.7.6)
|
||||||
|
concurrent-ruby (~> 1.0)
|
||||||
|
faraday (>= 0.9, < 2.0.0)
|
||||||
|
timeliness (~> 0.3.10)
|
||||||
|
ms_rest_azure (0.12.0)
|
||||||
|
concurrent-ruby (~> 1.0)
|
||||||
|
faraday (>= 0.9, < 2.0.0)
|
||||||
|
faraday-cookie_jar (~> 0.0.6)
|
||||||
|
ms_rest (~> 0.7.6)
|
||||||
|
multi_json (1.15.0)
|
||||||
|
multipart-post (2.1.1)
|
||||||
|
net-scp (3.0.0)
|
||||||
|
net-ssh (>= 2.6.5, < 7.0.0)
|
||||||
|
net-ssh (6.1.0)
|
||||||
|
net-ssh-gateway (2.0.0)
|
||||||
|
net-ssh (>= 4.0.0)
|
||||||
|
nori (2.6.0)
|
||||||
|
os (1.1.1)
|
||||||
|
parallel (1.19.2)
|
||||||
|
parslet (1.8.2)
|
||||||
|
pastel (0.8.0)
|
||||||
|
tty-color (~> 0.5)
|
||||||
|
pry (0.13.1)
|
||||||
|
coderay (~> 1.1)
|
||||||
|
method_source (~> 1.0)
|
||||||
|
public_suffix (4.0.6)
|
||||||
|
regexp_parser (1.8.2)
|
||||||
|
representable (3.0.4)
|
||||||
|
declarative (< 0.1.0)
|
||||||
|
declarative-option (< 0.2.0)
|
||||||
|
uber (< 0.2.0)
|
||||||
|
retriable (3.1.2)
|
||||||
|
rspec (3.9.0)
|
||||||
|
rspec-core (~> 3.9.0)
|
||||||
|
rspec-expectations (~> 3.9.0)
|
||||||
|
rspec-mocks (~> 3.9.0)
|
||||||
|
rspec-core (3.9.3)
|
||||||
|
rspec-support (~> 3.9.3)
|
||||||
|
rspec-expectations (3.9.3)
|
||||||
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
|
rspec-support (~> 3.9.0)
|
||||||
|
rspec-its (1.3.0)
|
||||||
|
rspec-core (>= 3.0.0)
|
||||||
|
rspec-expectations (>= 3.0.0)
|
||||||
|
rspec-mocks (3.9.1)
|
||||||
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
|
rspec-support (~> 3.9.0)
|
||||||
|
rspec-support (3.9.4)
|
||||||
|
rubyntlm (0.6.2)
|
||||||
|
rubyzip (1.3.0)
|
||||||
|
semverse (3.0.0)
|
||||||
|
signet (0.14.0)
|
||||||
|
addressable (~> 2.3)
|
||||||
|
faraday (>= 0.17.3, < 2.0)
|
||||||
|
jwt (>= 1.5, < 3.0)
|
||||||
|
multi_json (~> 1.10)
|
||||||
|
sslshake (1.3.1)
|
||||||
|
strings (0.2.0)
|
||||||
|
strings-ansi (~> 0.2)
|
||||||
|
unicode-display_width (~> 1.5)
|
||||||
|
unicode_utils (~> 1.4)
|
||||||
|
strings-ansi (0.2.0)
|
||||||
|
test-kitchen (2.7.2)
|
||||||
|
bcrypt_pbkdf (~> 1.0)
|
||||||
|
ed25519 (~> 1.2)
|
||||||
|
license-acceptance (>= 1.0.11, < 3.0)
|
||||||
|
mixlib-install (~> 3.6)
|
||||||
|
mixlib-shellout (>= 1.2, < 4.0)
|
||||||
|
net-scp (>= 1.1, < 4.0)
|
||||||
|
net-ssh (>= 2.9, < 7.0)
|
||||||
|
net-ssh-gateway (>= 1.2, < 3.0)
|
||||||
|
thor (>= 0.19, < 2.0)
|
||||||
|
winrm (~> 2.0)
|
||||||
|
winrm-elevated (~> 1.0)
|
||||||
|
winrm-fs (~> 1.1)
|
||||||
|
thor (1.0.1)
|
||||||
|
thread_safe (0.3.6)
|
||||||
|
timeliness (0.3.10)
|
||||||
|
tomlrb (1.2.9)
|
||||||
|
train (3.3.27)
|
||||||
|
activesupport (>= 5.2.4.3, < 6.0.0)
|
||||||
|
azure_graph_rbac (~> 0.16)
|
||||||
|
azure_mgmt_key_vault (~> 0.17)
|
||||||
|
azure_mgmt_resources (~> 0.15)
|
||||||
|
azure_mgmt_security (~> 0.18)
|
||||||
|
azure_mgmt_storage (~> 0.18)
|
||||||
|
docker-api (>= 1.26, < 3.0)
|
||||||
|
google-api-client (>= 0.23.9, < 0.44.1)
|
||||||
|
googleauth (>= 0.6.6, < 0.13.1)
|
||||||
|
inifile (~> 3.0)
|
||||||
|
train-core (= 3.3.27)
|
||||||
|
train-winrm (~> 0.2)
|
||||||
|
train-aws (0.1.18)
|
||||||
|
aws-sdk-apigateway (~> 1.0)
|
||||||
|
aws-sdk-apigatewayv2 (~> 1.0)
|
||||||
|
aws-sdk-athena (~> 1.0)
|
||||||
|
aws-sdk-autoscaling (~> 1.22.0)
|
||||||
|
aws-sdk-budgets (~> 1.0)
|
||||||
|
aws-sdk-cloudformation (~> 1.0)
|
||||||
|
aws-sdk-cloudfront (~> 1.0)
|
||||||
|
aws-sdk-cloudhsm (~> 1.0)
|
||||||
|
aws-sdk-cloudhsmv2 (~> 1.0)
|
||||||
|
aws-sdk-cloudtrail (~> 1.8)
|
||||||
|
aws-sdk-cloudwatch (~> 1.13)
|
||||||
|
aws-sdk-cloudwatchlogs (~> 1.13)
|
||||||
|
aws-sdk-codecommit (~> 1.0)
|
||||||
|
aws-sdk-codedeploy (~> 1.0)
|
||||||
|
aws-sdk-codepipeline (~> 1.0)
|
||||||
|
aws-sdk-configservice (~> 1.21)
|
||||||
|
aws-sdk-core (~> 3.0)
|
||||||
|
aws-sdk-costandusagereportservice (~> 1.6)
|
||||||
|
aws-sdk-dynamodb (~> 1.31)
|
||||||
|
aws-sdk-ec2 (~> 1.70)
|
||||||
|
aws-sdk-ecr (~> 1.18)
|
||||||
|
aws-sdk-ecs (~> 1.30)
|
||||||
|
aws-sdk-efs (~> 1.0)
|
||||||
|
aws-sdk-eks (~> 1.9)
|
||||||
|
aws-sdk-elasticache (~> 1.0)
|
||||||
|
aws-sdk-elasticbeanstalk (~> 1.0)
|
||||||
|
aws-sdk-elasticloadbalancing (~> 1.8)
|
||||||
|
aws-sdk-elasticloadbalancingv2 (~> 1.0)
|
||||||
|
aws-sdk-elasticsearchservice (~> 1.0)
|
||||||
|
aws-sdk-firehose (~> 1.0)
|
||||||
|
aws-sdk-guardduty (~> 1.31)
|
||||||
|
aws-sdk-iam (~> 1.13)
|
||||||
|
aws-sdk-kafka (~> 1.0)
|
||||||
|
aws-sdk-kinesis (~> 1.0)
|
||||||
|
aws-sdk-kms (~> 1.13)
|
||||||
|
aws-sdk-lambda (~> 1.0)
|
||||||
|
aws-sdk-organizations (~> 1.17.0)
|
||||||
|
aws-sdk-rds (~> 1.43)
|
||||||
|
aws-sdk-redshift (~> 1.0)
|
||||||
|
aws-sdk-route53 (~> 1.0)
|
||||||
|
aws-sdk-route53domains (~> 1.0)
|
||||||
|
aws-sdk-route53resolver (~> 1.0)
|
||||||
|
aws-sdk-s3 (~> 1.30)
|
||||||
|
aws-sdk-securityhub (~> 1.0)
|
||||||
|
aws-sdk-ses (~> 1.0)
|
||||||
|
aws-sdk-sms (~> 1.0)
|
||||||
|
aws-sdk-sns (~> 1.9)
|
||||||
|
aws-sdk-sqs (~> 1.10)
|
||||||
|
aws-sdk-ssm (~> 1.0)
|
||||||
|
train-core (3.3.27)
|
||||||
|
addressable (~> 2.5)
|
||||||
|
ffi (!= 1.13.0)
|
||||||
|
json (>= 1.8, < 3.0)
|
||||||
|
mixlib-shellout (>= 2.0, < 4.0)
|
||||||
|
net-scp (>= 1.2, < 4.0)
|
||||||
|
net-ssh (>= 2.9, < 7.0)
|
||||||
|
train-habitat (0.2.13)
|
||||||
|
train-winrm (0.2.11)
|
||||||
|
winrm (~> 2.0)
|
||||||
|
winrm-elevated (~> 1.2.2)
|
||||||
|
winrm-fs (~> 1.0)
|
||||||
|
tty-box (0.6.0)
|
||||||
|
pastel (~> 0.8)
|
||||||
|
strings (~> 0.2.0)
|
||||||
|
tty-cursor (~> 0.7)
|
||||||
|
tty-color (0.5.2)
|
||||||
|
tty-cursor (0.7.1)
|
||||||
|
tty-prompt (0.22.0)
|
||||||
|
pastel (~> 0.8)
|
||||||
|
tty-reader (~> 0.8)
|
||||||
|
tty-reader (0.8.0)
|
||||||
|
tty-cursor (~> 0.7)
|
||||||
|
tty-screen (~> 0.8)
|
||||||
|
wisper (~> 2.0)
|
||||||
|
tty-screen (0.8.1)
|
||||||
|
tty-table (0.12.0)
|
||||||
|
pastel (~> 0.8)
|
||||||
|
strings (~> 0.2.0)
|
||||||
|
tty-screen (~> 0.8)
|
||||||
|
tzinfo (1.2.7)
|
||||||
|
thread_safe (~> 0.1)
|
||||||
|
uber (0.1.0)
|
||||||
|
unf (0.1.4)
|
||||||
|
unf_ext
|
||||||
|
unf_ext (0.0.7.7)
|
||||||
|
unicode-display_width (1.7.0)
|
||||||
|
unicode_utils (1.4.0)
|
||||||
|
uri_template (0.7.0)
|
||||||
|
winrm (2.3.5)
|
||||||
|
builder (>= 2.1.2)
|
||||||
|
erubi (~> 1.8)
|
||||||
|
gssapi (~> 1.2)
|
||||||
|
gyoku (~> 1.0)
|
||||||
|
httpclient (~> 2.2, >= 2.2.0.2)
|
||||||
|
logging (>= 1.6.1, < 3.0)
|
||||||
|
nori (~> 2.0)
|
||||||
|
rubyntlm (~> 0.6.0, >= 0.6.1)
|
||||||
|
winrm-elevated (1.2.2)
|
||||||
|
erubi (~> 1.8)
|
||||||
|
winrm (~> 2.0)
|
||||||
|
winrm-fs (~> 1.0)
|
||||||
|
winrm-fs (1.3.3)
|
||||||
|
erubi (~> 1.8)
|
||||||
|
logging (>= 1.6.1, < 3.0)
|
||||||
|
rubyzip (~> 1.1)
|
||||||
|
winrm (~> 2.0)
|
||||||
|
wisper (2.0.1)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
kitchen-salt
|
inspec (~> 4.22.22)
|
||||||
|
kitchen-docker!
|
||||||
|
kitchen-inspec (>= 2.2.1)
|
||||||
|
kitchen-salt (>= 0.6.3)
|
||||||
kitchen-vagrant
|
kitchen-vagrant
|
||||||
test-kitchen (> 1.2.0)
|
|
||||||
|
BUNDLED WITH
|
||||||
|
2.1.2
|
||||||
|
|||||||
147
README.rst
147
README.rst
@@ -1,147 +0,0 @@
|
|||||||
========
|
|
||||||
postgres
|
|
||||||
========
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
See the full `Salt Formulas installation and usage instructions
|
|
||||||
<http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_.
|
|
||||||
|
|
||||||
Available states
|
|
||||||
================
|
|
||||||
|
|
||||||
.. contents::
|
|
||||||
:local:
|
|
||||||
|
|
||||||
``postgres``
|
|
||||||
------------
|
|
||||||
|
|
||||||
Installs and configures both PostgreSQL server and client with creation of various DB objects in
|
|
||||||
the cluster. This state applies to both Linux and MacOS.
|
|
||||||
|
|
||||||
``postgres.client``
|
|
||||||
-------------------
|
|
||||||
|
|
||||||
Installs the PostgreSQL client binaries and libraries on Linux.
|
|
||||||
|
|
||||||
``postgres.manage``
|
|
||||||
-------------------
|
|
||||||
|
|
||||||
Creates such DB objects as: users, tablespaces, databases, schemas and extensions.
|
|
||||||
See ``pillar.example`` file for details.
|
|
||||||
|
|
||||||
``postgres.python``
|
|
||||||
----------------------
|
|
||||||
|
|
||||||
Installs the PostgreSQL adapter for Python on Linux.
|
|
||||||
|
|
||||||
``postgres.server``
|
|
||||||
-------------------
|
|
||||||
|
|
||||||
Installs the PostgreSQL server package on Linux, prepares the DB cluster and starts the server using
|
|
||||||
packaged init script, job or unit.
|
|
||||||
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
For PostgreSQL server before version 10 to work inside a **FreeBSD Jail**
|
|
||||||
set ``sysvshm=new`` and ``sysvsem=new``.
|
|
||||||
DO NOT SET ``allow.sysvipc=1``. It defeats the purpose of using Jails.
|
|
||||||
|
|
||||||
Further information: https://blog.tyk.nu/blog/freebsd-jails-and-sysv-ipc/
|
|
||||||
|
|
||||||
|
|
||||||
``postgres.server.image``
|
|
||||||
-------------------------
|
|
||||||
|
|
||||||
Installs the PostgreSQL server package on Linux, prepares the DB cluster and starts the server by issuing
|
|
||||||
raw ``pg_ctl`` command. The ``postgres:bake_image`` Pillar toggles this behaviour. For example:
|
|
||||||
|
|
||||||
.. code:: yaml
|
|
||||||
|
|
||||||
postgres:
|
|
||||||
bake_image: True
|
|
||||||
|
|
||||||
If set ``True``, then it becomes possible to fully provision PostgreSQL with all supported entities
|
|
||||||
from ``postgres.manage`` state during the build ("baking") of AMI / VM / Container images (using
|
|
||||||
Packer, Docker or similar tools), i.e. when OS ``init`` process is not available to start the
|
|
||||||
service and enable it on "boot" of resulting appliance.
|
|
||||||
|
|
||||||
Also it allows to make Docker images with PostgreSQL using functionality being available since Salt
|
|
||||||
2016.11.0 release:
|
|
||||||
|
|
||||||
.. code:: console
|
|
||||||
|
|
||||||
salt 'minion.with.docker' dockerng.sls_build my-postgres base=centos/systemd mods=postgres
|
|
||||||
|
|
||||||
If a lookup dictionary or Pillar has ``postgres:bake_image`` set ``False`` (this is default), it is
|
|
||||||
equivalent of applying ``postgres.server`` state.
|
|
||||||
|
|
||||||
``postgres.upstream``
|
|
||||||
---------------------
|
|
||||||
|
|
||||||
Configures the PostgreSQL Official (upstream) repository on target system if
|
|
||||||
applicable.
|
|
||||||
|
|
||||||
The state relies on the ``postgres:use_upstream_repo`` Pillar value which could be set as following:
|
|
||||||
|
|
||||||
* ``True`` (default): adds the upstream repository to install packages from
|
|
||||||
* ``False``: makes sure that the repository configuration is absent
|
|
||||||
* ``'postgresapp'`` (MacOS) uses upstream PostgresApp package repository.
|
|
||||||
* ``'homebrew'`` (MacOS) uses Homebrew postgres
|
|
||||||
|
|
||||||
The ``postgres:version`` Pillar controls which version of the PostgreSQL packages should be
|
|
||||||
installed from the upstream Linux repository. Defaults to ``9.5``.
|
|
||||||
|
|
||||||
|
|
||||||
Removal states
|
|
||||||
===============
|
|
||||||
|
|
||||||
``postgres.dropped``
|
|
||||||
--------------------
|
|
||||||
|
|
||||||
Meta state to remove Postgres software. By default the release installed by formula is targeted only. To target multiple releases, set pillar ``postgres.remove.multiple_releases: True``.
|
|
||||||
|
|
||||||
``postgres.server.remove``
|
|
||||||
------------------------
|
|
||||||
|
|
||||||
Remove server, lib, and contrib packages. The ``postgres.server.remove`` will retain data by default (no data loss) - set pillar ``postgres.remove.data: True`` to remove data and configuration directories also.
|
|
||||||
|
|
||||||
``postgres.client.remove``
|
|
||||||
------------------------
|
|
||||||
|
|
||||||
Remove client package.
|
|
||||||
|
|
||||||
``postgres.dev.remove``
|
|
||||||
----------------------
|
|
||||||
|
|
||||||
Remove development and python packages.
|
|
||||||
|
|
||||||
|
|
||||||
Testing
|
|
||||||
=======
|
|
||||||
The ``postgres`` state was tested on MacOS (El Capitan 10.11.6), and ``remove`` states on Ubuntu, Centos, and Fedora.
|
|
||||||
|
|
||||||
Linux testing is done with the ``kitchen-salt``.
|
|
||||||
|
|
||||||
``kitchen converge``
|
|
||||||
--------------------
|
|
||||||
|
|
||||||
Runs the ``postgres`` main state.
|
|
||||||
|
|
||||||
``kitchen verify``
|
|
||||||
------------------
|
|
||||||
|
|
||||||
Runs ``serverspec`` tests on the actual instance.
|
|
||||||
|
|
||||||
``kitchen test``
|
|
||||||
----------------
|
|
||||||
|
|
||||||
Builds and runs tests from scratch.
|
|
||||||
|
|
||||||
``kitchen login``
|
|
||||||
-----------------
|
|
||||||
|
|
||||||
Gives you ssh to the vagrant machine for manual testing.
|
|
||||||
|
|
||||||
.. vim: fenc=utf-8 spell spl=en cc=100 tw=99 fo=want sts=2 sw=2 et
|
|
||||||
16
bin/install-hooks
Executable file
16
bin/install-hooks
Executable file
@@ -0,0 +1,16 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
set -o nounset # Treat unset variables as an error and immediately exit
|
||||||
|
set -o errexit # If a command fails exit the whole script
|
||||||
|
|
||||||
|
if [ "${DEBUG:-false}" = "true" ]; then
|
||||||
|
set -x # Run the entire script in debug mode
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! command -v pre-commit >/dev/null 2>&1; then
|
||||||
|
echo "pre-commit not found: please install or check your PATH" >&2
|
||||||
|
echo "See https://pre-commit.com/#installation" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
pre-commit install --install-hooks
|
||||||
|
pre-commit install --hook-type commit-msg --install-hooks
|
||||||
32
bin/kitchen
Executable file
32
bin/kitchen
Executable file
@@ -0,0 +1,32 @@
|
|||||||
|
#!/usr/bin/env ruby
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
#
|
||||||
|
# This file was generated by Bundler.
|
||||||
|
#
|
||||||
|
# The application 'kitchen' is installed as part of a gem, and
|
||||||
|
# this file is here to facilitate running it.
|
||||||
|
#
|
||||||
|
|
||||||
|
require 'pathname'
|
||||||
|
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
|
||||||
|
Pathname.new(__FILE__).realpath)
|
||||||
|
|
||||||
|
bundle_binstub = File.expand_path('bundle', __dir__)
|
||||||
|
|
||||||
|
if File.file?(bundle_binstub)
|
||||||
|
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
||||||
|
load(bundle_binstub)
|
||||||
|
else
|
||||||
|
abort(
|
||||||
|
'Your `bin/bundle` was not generated by Bundler, '\
|
||||||
|
'so this binstub cannot run. Replace `bin/bundle` by running '\
|
||||||
|
'`bundle binstubs bundler --force`, then run this command again.'
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
require 'rubygems'
|
||||||
|
require 'bundler/setup'
|
||||||
|
|
||||||
|
load Gem.bin_path('test-kitchen', 'kitchen')
|
||||||
8
commitlint.config.js
Normal file
8
commitlint.config.js
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
module.exports = {
|
||||||
|
extends: ['@commitlint/config-conventional'],
|
||||||
|
rules: {
|
||||||
|
'body-max-line-length': [2, 'always', 120],
|
||||||
|
'footer-max-line-length': [2, 'always', 120],
|
||||||
|
'header-max-length': [2, 'always', 72],
|
||||||
|
},
|
||||||
|
};
|
||||||
212
docs/AUTHORS.rst
Normal file
212
docs/AUTHORS.rst
Normal file
@@ -0,0 +1,212 @@
|
|||||||
|
.. role:: raw-html-m2r(raw)
|
||||||
|
:format: html
|
||||||
|
|
||||||
|
|
||||||
|
Authors
|
||||||
|
=======
|
||||||
|
|
||||||
|
This list is sorted by the number of commits per contributor in *descending* order.
|
||||||
|
|
||||||
|
.. list-table::
|
||||||
|
:header-rows: 1
|
||||||
|
|
||||||
|
* - Avatar
|
||||||
|
- Contributor
|
||||||
|
- Contributions
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/10231489?v=4' width='36' height='36' alt='@myii'>`
|
||||||
|
- `@myii <https://github.com/myii>`_
|
||||||
|
- 129
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/13322818?v=4' width='36' height='36' alt='@noelmcloughlin'>`
|
||||||
|
- `@noelmcloughlin <https://github.com/noelmcloughlin>`_
|
||||||
|
- 72
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/1800660?v=4' width='36' height='36' alt='@aboe76'>`
|
||||||
|
- `@aboe76 <https://github.com/aboe76>`_
|
||||||
|
- 54
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/1396878?v=4' width='36' height='36' alt='@gravyboat'>`
|
||||||
|
- `@gravyboat <https://github.com/gravyboat>`_
|
||||||
|
- 41
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/242396?v=4' width='36' height='36' alt='@javierbertoli'>`
|
||||||
|
- `@javierbertoli <https://github.com/javierbertoli>`_
|
||||||
|
- 19
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/3374962?v=4' width='36' height='36' alt='@nmadhok'>`
|
||||||
|
- `@nmadhok <https://github.com/nmadhok>`_
|
||||||
|
- 19
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/16338056?v=4' width='36' height='36' alt='@vutny'>`
|
||||||
|
- `@vutny <https://github.com/vutny>`_
|
||||||
|
- 18
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/528061?v=4' width='36' height='36' alt='@puneetk'>`
|
||||||
|
- `@puneetk <https://github.com/puneetk>`_
|
||||||
|
- 11
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/745513?v=4' width='36' height='36' alt='@EvaSDK'>`
|
||||||
|
- `@EvaSDK <https://github.com/EvaSDK>`_
|
||||||
|
- 9
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/1713422?v=4' width='36' height='36' alt='@dferrantelli'>`
|
||||||
|
- `@dferrantelli <https://github.com/dferrantelli>`_
|
||||||
|
- 8
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/5306980?v=4' width='36' height='36' alt='@johnkeates'>`
|
||||||
|
- `@johnkeates <https://github.com/johnkeates>`_
|
||||||
|
- 8
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/91293?v=4' width='36' height='36' alt='@whiteinge'>`
|
||||||
|
- `@whiteinge <https://github.com/whiteinge>`_
|
||||||
|
- 8
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/117961?v=4' width='36' height='36' alt='@babilen5'>`
|
||||||
|
- `@babilen5 <https://github.com/babilen5>`_
|
||||||
|
- 8
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/20441?v=4' width='36' height='36' alt='@iggy'>`
|
||||||
|
- `@iggy <https://github.com/iggy>`_
|
||||||
|
- 7
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/13106485?v=4' width='36' height='36' alt='@dynjnelson'>`
|
||||||
|
- `@dynjnelson <https://github.com/dynjnelson>`_
|
||||||
|
- 7
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/3449635?v=4' width='36' height='36' alt='@rominf'>`
|
||||||
|
- `@rominf <https://github.com/rominf>`_
|
||||||
|
- 7
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/223763?v=4' width='36' height='36' alt='@alfredopalhares'>`
|
||||||
|
- `@alfredopalhares <https://github.com/alfredopalhares>`_
|
||||||
|
- 6
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/1920805?v=4' width='36' height='36' alt='@alxwr'>`
|
||||||
|
- `@alxwr <https://github.com/alxwr>`_
|
||||||
|
- 5
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/74739?v=4' width='36' height='36' alt='@audreyfeldroy'>`
|
||||||
|
- `@audreyfeldroy <https://github.com/audreyfeldroy>`_
|
||||||
|
- 5
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/278900?v=4' width='36' height='36' alt='@blast-hardcheese'>`
|
||||||
|
- `@blast-hardcheese <https://github.com/blast-hardcheese>`_
|
||||||
|
- 5
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/2179770?v=4' width='36' height='36' alt='@gilou'>`
|
||||||
|
- `@gilou <https://github.com/gilou>`_
|
||||||
|
- 5
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/287147?v=4' width='36' height='36' alt='@techhat'>`
|
||||||
|
- `@techhat <https://github.com/techhat>`_
|
||||||
|
- 5
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/2995329?v=4' width='36' height='36' alt='@t0fik'>`
|
||||||
|
- `@t0fik <https://github.com/t0fik>`_
|
||||||
|
- 5
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/3768412?v=4' width='36' height='36' alt='@stp-ip'>`
|
||||||
|
- `@stp-ip <https://github.com/stp-ip>`_
|
||||||
|
- 4
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/1435085?v=4' width='36' height='36' alt='@blbradley'>`
|
||||||
|
- `@blbradley <https://github.com/blbradley>`_
|
||||||
|
- 3
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/2192630?v=4' width='36' height='36' alt='@abrefort'>`
|
||||||
|
- `@abrefort <https://github.com/abrefort>`_
|
||||||
|
- 3
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/296940?v=4' width='36' height='36' alt='@renoirb'>`
|
||||||
|
- `@renoirb <https://github.com/renoirb>`_
|
||||||
|
- 3
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/4195158?v=4' width='36' height='36' alt='@dafyddj'>`
|
||||||
|
- `@dafyddj <https://github.com/dafyddj>`_
|
||||||
|
- 2
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/1078927?v=4' width='36' height='36' alt='@Ken-2scientists'>`
|
||||||
|
- `@Ken-2scientists <https://github.com/Ken-2scientists>`_
|
||||||
|
- 2
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/22311?v=4' width='36' height='36' alt='@madssj'>`
|
||||||
|
- `@madssj <https://github.com/madssj>`_
|
||||||
|
- 2
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/102919?v=4' width='36' height='36' alt='@h3'>`
|
||||||
|
- `@h3 <https://github.com/h3>`_
|
||||||
|
- 2
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/6415605?v=4' width='36' height='36' alt='@tgoodaire'>`
|
||||||
|
- `@tgoodaire <https://github.com/tgoodaire>`_
|
||||||
|
- 2
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/26276?v=4' width='36' height='36' alt='@durana'>`
|
||||||
|
- `@durana <https://github.com/durana>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/1922124?v=4' width='36' height='36' alt='@bebosudo'>`
|
||||||
|
- `@bebosudo <https://github.com/bebosudo>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/7353491?v=4' width='36' height='36' alt='@sarcastic-coder'>`
|
||||||
|
- `@sarcastic-coder <https://github.com/sarcastic-coder>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/458548?v=4' width='36' height='36' alt='@SuperTux88'>`
|
||||||
|
- `@SuperTux88 <https://github.com/SuperTux88>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/36720?v=4' width='36' height='36' alt='@brot'>`
|
||||||
|
- `@brot <https://github.com/brot>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/1020898?v=4' width='36' height='36' alt='@xbglowx'>`
|
||||||
|
- `@xbglowx <https://github.com/xbglowx>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/83323?v=4' width='36' height='36' alt='@cro'>`
|
||||||
|
- `@cro <https://github.com/cro>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/8599847?v=4' width='36' height='36' alt='@campbellmc'>`
|
||||||
|
- `@campbellmc <https://github.com/campbellmc>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/306240?v=4' width='36' height='36' alt='@UtahDave'>`
|
||||||
|
- `@UtahDave <https://github.com/UtahDave>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/215487?v=4' width='36' height='36' alt='@fcrozat'>`
|
||||||
|
- `@fcrozat <https://github.com/fcrozat>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/1468874?v=4' width='36' height='36' alt='@Laogeodritt'>`
|
||||||
|
- `@Laogeodritt <https://github.com/Laogeodritt>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/650691?v=4' width='36' height='36' alt='@itbabu'>`
|
||||||
|
- `@itbabu <https://github.com/itbabu>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/296523?v=4' width='36' height='36' alt='@mkotsbak'>`
|
||||||
|
- `@mkotsbak <https://github.com/mkotsbak>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/1331128?v=4' width='36' height='36' alt='@mattysads'>`
|
||||||
|
- `@mattysads <https://github.com/mattysads>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/3705387?v=4' width='36' height='36' alt='@mbrannigan'>`
|
||||||
|
- `@mbrannigan <https://github.com/mbrannigan>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/3433835?v=4' width='36' height='36' alt='@n-rodriguez'>`
|
||||||
|
- `@n-rodriguez <https://github.com/n-rodriguez>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/8399114?v=4' width='36' height='36' alt='@fortunejuggle'>`
|
||||||
|
- `@fortunejuggle <https://github.com/fortunejuggle>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/219695?v=4' width='36' height='36' alt='@rmoorman'>`
|
||||||
|
- `@rmoorman <https://github.com/rmoorman>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/154676?v=4' width='36' height='36' alt='@skurfer'>`
|
||||||
|
- `@skurfer <https://github.com/skurfer>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/2592431?v=4' width='36' height='36' alt='@RobRuana'>`
|
||||||
|
- `@RobRuana <https://github.com/RobRuana>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/10464711?v=4' width='36' height='36' alt='@sbrefort'>`
|
||||||
|
- `@sbrefort <https://github.com/sbrefort>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/125458?v=4' width='36' height='36' alt='@sbellem'>`
|
||||||
|
- `@sbellem <https://github.com/sbellem>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/500703?v=4' width='36' height='36' alt='@retrry'>`
|
||||||
|
- `@retrry <https://github.com/retrry>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/2814878?v=4' width='36' height='36' alt='@thomasrossetto'>`
|
||||||
|
- `@thomasrossetto <https://github.com/thomasrossetto>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/507599?v=4' width='36' height='36' alt='@thatch45'>`
|
||||||
|
- `@thatch45 <https://github.com/thatch45>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/444668?v=4' width='36' height='36' alt='@tobio'>`
|
||||||
|
- `@tobio <https://github.com/tobio>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/2097647?v=4' width='36' height='36' alt='@XRasher'>`
|
||||||
|
- `@XRasher <https://github.com/XRasher>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/8005290?v=4' width='36' height='36' alt='@YetAnotherMinion'>`
|
||||||
|
- `@YetAnotherMinion <https://github.com/YetAnotherMinion>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/17393048?v=4' width='36' height='36' alt='@ek9'>`
|
||||||
|
- `@ek9 <https://github.com/ek9>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/11394644?v=4' width='36' height='36' alt='@Strade288'>`
|
||||||
|
- `@Strade288 <https://github.com/Strade288>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/46799934?v=4' width='36' height='36' alt='@sticky-note'>`
|
||||||
|
- `@sticky-note <https://github.com/sticky-note>`_
|
||||||
|
- 1
|
||||||
|
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/52996?v=4' width='36' height='36' alt='@daks'>`
|
||||||
|
- `@daks <https://github.com/daks>`_
|
||||||
|
- 1
|
||||||
|
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Auto-generated by a `forked version <https://github.com/myii/maintainer>`_ of `gaocegege/maintainer <https://github.com/gaocegege/maintainer>`_ on 2020-12-16.
|
||||||
350
docs/CHANGELOG.rst
Normal file
350
docs/CHANGELOG.rst
Normal file
@@ -0,0 +1,350 @@
|
|||||||
|
|
||||||
|
Changelog
|
||||||
|
=========
|
||||||
|
|
||||||
|
`0.41.4 <https://github.com/saltstack-formulas/postgres-formula/compare/v0.41.3...v0.41.4>`_ (2020-12-16)
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Bug Fixes
|
||||||
|
^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **archlinux:** avoid nonetype error (\ `0a6cf8f <https://github.com/saltstack-formulas/postgres-formula/commit/0a6cf8fefae1bbd5668a447ced911088ac965475>`_\ )
|
||||||
|
* **archlinux:** use consistent jinja repo check (\ `3a955e0 <https://github.com/saltstack-formulas/postgres-formula/commit/3a955e02708b23929c93f879bcba0e3fe5ae5666>`_\ )
|
||||||
|
* **jinja:** syntax correction (\ `8b44c06 <https://github.com/saltstack-formulas/postgres-formula/commit/8b44c068fcfd4199336596bdba095fc0e6c8fb2e>`_\ )
|
||||||
|
* **python:** use python3 postres on cent7/8 (\ `d6d1068 <https://github.com/saltstack-formulas/postgres-formula/commit/d6d1068395131de08534e387d377389bd078d3ee>`_\ )
|
||||||
|
* **suse:** version 11+ repo support on suse (\ `b3f381e <https://github.com/saltstack-formulas/postgres-formula/commit/b3f381e54750a00bb19a4aa50c6273c627dca16c>`_\ )
|
||||||
|
|
||||||
|
Continuous Integration
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **gitlab-ci:** use GitLab CI as Travis CI replacement (\ `a45673a <https://github.com/saltstack-formulas/postgres-formula/commit/a45673a87892deb973afee3689aea4bebd7a5739>`_\ )
|
||||||
|
* **pre-commit:** add to formula [skip ci] (\ `db1794b <https://github.com/saltstack-formulas/postgres-formula/commit/db1794b6bbb6ce183e5231cb4b7e7193dcb80143>`_\ )
|
||||||
|
* **pre-commit:** enable/disable ``rstcheck`` as relevant [skip ci] (\ `f04d60a <https://github.com/saltstack-formulas/postgres-formula/commit/f04d60a773461dce98b4f2a7c8abbbab268513a0>`_\ )
|
||||||
|
* **pre-commit:** finalise ``rstcheck`` configuration [skip ci] (\ `7036f60 <https://github.com/saltstack-formulas/postgres-formula/commit/7036f60e8ca3857beeca18abe70a3c59b6a021ec>`_\ )
|
||||||
|
|
||||||
|
`0.41.3 <https://github.com/saltstack-formulas/postgres-formula/compare/v0.41.2...v0.41.3>`_ (2020-09-29)
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Bug Fixes
|
||||||
|
^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **upstream:** require_in/require use_upstream (\ `ab6b97e <https://github.com/saltstack-formulas/postgres-formula/commit/ab6b97e8c3ff40f9cb2e629c3c0faf09ca59ede9>`_\ )
|
||||||
|
|
||||||
|
`0.41.2 <https://github.com/saltstack-formulas/postgres-formula/compare/v0.41.1...v0.41.2>`_ (2020-07-27)
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Bug Fixes
|
||||||
|
^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **macros:** fix ``format_kwargs`` macro (\ `5e6511b <https://github.com/saltstack-formulas/postgres-formula/commit/5e6511b783388930010e6c0795b197728fb10b39>`_\ )
|
||||||
|
|
||||||
|
Continuous Integration
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **kitchen:** ubuntu-2004-master-py3 added (\ `7978976 <https://github.com/saltstack-formulas/postgres-formula/commit/79789765439bb0727521dc817fe9eaebba000a67>`_\ )
|
||||||
|
* **kitchen+travis:** use latest pre-salted images [skip ci] (\ `702323c <https://github.com/saltstack-formulas/postgres-formula/commit/702323c24df1df6b11defd663b55cf38586bd3f3>`_\ )
|
||||||
|
* **travis:** ubuntu upgrade from 16 to 18 & 20 (\ `44568a6 <https://github.com/saltstack-formulas/postgres-formula/commit/44568a680602fb61f157b74dc05f9af9b153e8e6>`_\ )
|
||||||
|
|
||||||
|
Styles
|
||||||
|
^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **libtofs.jinja:** use Black-inspired Jinja formatting [skip ci] (\ `8735cf8 <https://github.com/saltstack-formulas/postgres-formula/commit/8735cf8ad1b9fc1eb816aecf3d363d4fc81fbe66>`_\ )
|
||||||
|
|
||||||
|
`0.41.1 <https://github.com/saltstack-formulas/postgres-formula/compare/v0.41.0...v0.41.1>`_ (2020-07-10)
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Bug Fixes
|
||||||
|
^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **contributing:** postgresql-repo state ID requires python3-apt package (\ `69b57e3 <https://github.com/saltstack-formulas/postgres-formula/commit/69b57e3b69062d0b66bd9fb28e3769a9ff579faa>`_\ )
|
||||||
|
* **contributing:** postgresql-service-reload type (\ `278893c <https://github.com/saltstack-formulas/postgres-formula/commit/278893c2f0f3fa8db26b45b3874f7dd7177b714a>`_\ )
|
||||||
|
* **contributing:** runnig formula inside container (\ `68a791e <https://github.com/saltstack-formulas/postgres-formula/commit/68a791ef091114b081f71631d94201a9f1ed07b6>`_\ )
|
||||||
|
* **libtofs:** “files_switch” mess up the variable exported by “map.jinja” [skip ci] (\ `e6b1485 <https://github.com/saltstack-formulas/postgres-formula/commit/e6b14853d5ce2369ead22cabdfc48ae63f64e550>`_\ )
|
||||||
|
* **postgres.server:** reverted how posrgre.server.image is included (\ `07044bf <https://github.com/saltstack-formulas/postgres-formula/commit/07044bf7c1d420855b43d6add30358ff39666702>`_\ )
|
||||||
|
|
||||||
|
Continuous Integration
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **gemfile:** remove unused ``rspec-retry`` gem [skip ci] (\ `85feac2 <https://github.com/saltstack-formulas/postgres-formula/commit/85feac2852ee399f37293b60008e3a17d19cd47f>`_\ )
|
||||||
|
* **gemfile:** update for Vagrant testing [skip ci] (\ `061715e <https://github.com/saltstack-formulas/postgres-formula/commit/061715e560880a9a60720bbcbeda632c010d03a4>`_\ )
|
||||||
|
* **gemfile.lock:** add to repo with updated ``Gemfile`` [skip ci] (\ `35850da <https://github.com/saltstack-formulas/postgres-formula/commit/35850da22cb4f61144a61098b9869603b6e0a682>`_\ )
|
||||||
|
* **kitchen:** avoid using bootstrap for ``master`` instances [skip ci] (\ `86697d8 <https://github.com/saltstack-formulas/postgres-formula/commit/86697d8df48e24e37d6885f68ea8988d43b076aa>`_\ )
|
||||||
|
* **kitchen:** use ``saltimages`` Docker Hub where available [skip ci] (\ `5e29999 <https://github.com/saltstack-formulas/postgres-formula/commit/5e29999495f36653aa1b51f2baf956533fdee7e4>`_\ )
|
||||||
|
* **kitchen+travis:** remove ``master-py2-arch-base-latest`` [skip ci] (\ `c46053a <https://github.com/saltstack-formulas/postgres-formula/commit/c46053abd8019a4229daf19db1af86c5f8961353>`_\ )
|
||||||
|
* **travis:** add notifications => zulip [skip ci] (\ `442cfec <https://github.com/saltstack-formulas/postgres-formula/commit/442cfec245fb6b22d7768c8436ba6c62ca2975fd>`_\ )
|
||||||
|
* **workflows/commitlint:** add to repo [skip ci] (\ `0c766c8 <https://github.com/saltstack-formulas/postgres-formula/commit/0c766c8e2e336e31d44fdddf5f4c5e56faa9e40e>`_\ )
|
||||||
|
|
||||||
|
Documentation
|
||||||
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **container:** "postgres:bake_image" specifics (\ `904a525 <https://github.com/saltstack-formulas/postgres-formula/commit/904a5258cd155f3b5a83ec8dc8e990a8ffc6b798>`_\ )
|
||||||
|
|
||||||
|
`0.41.0 <https://github.com/saltstack-formulas/postgres-formula/compare/v0.40.5...v0.41.0>`_ (2019-12-27)
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Bug Fixes
|
||||||
|
^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **mac_shortcut.sh:** fix ``shellcheck`` error (\ `d538798 <https://github.com/saltstack-formulas/postgres-formula/commit/d538798ee4423ecb72b29bd39e4f35437412ce43>`_\ )
|
||||||
|
* **release.config.js:** use full commit hash in commit link [skip ci] (\ `f3ec66d <https://github.com/saltstack-formulas/postgres-formula/commit/f3ec66d5ed90bc9a458fdff2233c9a707f0c9c72>`_\ )
|
||||||
|
|
||||||
|
Continuous Integration
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **gemfile:** restrict ``train`` gem version until upstream fix [skip ci] (\ `a77bb06 <https://github.com/saltstack-formulas/postgres-formula/commit/a77bb06b18823c7db0debd2c4ff135a367f76d04>`_\ )
|
||||||
|
* **kitchen:** use ``develop`` image until ``master`` is ready (\ ``amazonlinux``\ ) [skip ci] (\ `20e5e46 <https://github.com/saltstack-formulas/postgres-formula/commit/20e5e46e1011641714a11756617530b898e3d689>`_\ )
|
||||||
|
* **kitchen+travis:** upgrade matrix after ``2019.2.2`` release [skip ci] (\ `8080be6 <https://github.com/saltstack-formulas/postgres-formula/commit/8080be6be3dd0c8799fa102b1235fb151514bced>`_\ )
|
||||||
|
* **travis:** apply changes from build config validation [skip ci] (\ `8ce1ee4 <https://github.com/saltstack-formulas/postgres-formula/commit/8ce1ee4ecc5dd6a6a14118eda75b3446b6f58d82>`_\ )
|
||||||
|
* **travis:** opt-in to ``dpl v2`` to complete build config validation [skip ci] (\ `bd5959c <https://github.com/saltstack-formulas/postgres-formula/commit/bd5959c60a93e65ea0658f5cb7fd1609bdd3399c>`_\ )
|
||||||
|
* **travis:** quote pathspecs used with ``git ls-files`` [skip ci] (\ `0a2b63a <https://github.com/saltstack-formulas/postgres-formula/commit/0a2b63aba85b09c8983d066cbad7e344de791db1>`_\ )
|
||||||
|
* **travis:** run ``shellcheck`` during lint job [skip ci] (\ `f0d12ca <https://github.com/saltstack-formulas/postgres-formula/commit/f0d12caac67bf7f2049ca7f1b7185912e876cb02>`_\ )
|
||||||
|
* **travis:** use ``major.minor`` for ``semantic-release`` version [skip ci] (\ `1392538 <https://github.com/saltstack-formulas/postgres-formula/commit/1392538665bea2a699836a87a6b749e07276a94d>`_\ )
|
||||||
|
* **travis:** use build config validation (beta) [skip ci] (\ `c9a57aa <https://github.com/saltstack-formulas/postgres-formula/commit/c9a57aa96bb80dc27c4722e0f8dc45c77460c03a>`_\ )
|
||||||
|
|
||||||
|
Features
|
||||||
|
^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **codenamemap:** update for current versions (\ `9cc95c0 <https://github.com/saltstack-formulas/postgres-formula/commit/9cc95c020909563486f404b186e15ed71dd8a83a>`_\ )
|
||||||
|
|
||||||
|
Performance Improvements
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **travis:** improve ``salt-lint`` invocation [skip ci] (\ `ccaf4e5 <https://github.com/saltstack-formulas/postgres-formula/commit/ccaf4e5e3729c75c3a5eccbf482e7fca09415fea>`_\ )
|
||||||
|
|
||||||
|
`0.40.5 <https://github.com/saltstack-formulas/postgres-formula/compare/v0.40.4...v0.40.5>`_ (2019-10-28)
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Bug Fixes
|
||||||
|
^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **macros.jinja:** apply suggestion from PR (\ ` <https://github.com/saltstack-formulas/postgres-formula/commit/d606b28>`_\ )
|
||||||
|
* **macros.jinja:** use ``user`` kwarg for schemas (required on FreeBSD) (\ ` <https://github.com/saltstack-formulas/postgres-formula/commit/7ff798a>`_\ )
|
||||||
|
|
||||||
|
Continuous Integration
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **kitchen:** add pre-salted ``FreeBSD-12.0`` box for local testing (\ ` <https://github.com/saltstack-formulas/postgres-formula/commit/eefb89e>`_\ )
|
||||||
|
* **kitchen:** use ``debian-10-master-py3`` instead of ``develop`` [skip ci] (\ ` <https://github.com/saltstack-formulas/postgres-formula/commit/81b2c2e>`_\ )
|
||||||
|
* **travis:** update ``salt-lint`` config for ``v0.0.10`` [skip ci] (\ ` <https://github.com/saltstack-formulas/postgres-formula/commit/62baac2>`_\ )
|
||||||
|
|
||||||
|
Documentation
|
||||||
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **contributing:** remove to use org-level file instead [skip ci] (\ ` <https://github.com/saltstack-formulas/postgres-formula/commit/5a291ab>`_\ )
|
||||||
|
* **readme:** update link to ``CONTRIBUTING`` [skip ci] (\ ` <https://github.com/saltstack-formulas/postgres-formula/commit/e568f28>`_\ )
|
||||||
|
|
||||||
|
`0.40.4 <https://github.com/saltstack-formulas/postgres-formula/compare/v0.40.3...v0.40.4>`_ (2019-10-11)
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Bug Fixes
|
||||||
|
^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **rubocop:** add fixes using ``rubocop --safe-auto-correct`` (\ ` <https://github.com/saltstack-formulas/postgres-formula/commit/37b0c43>`_\ )
|
||||||
|
* **rubocop:** fix remaining errors manually (\ ` <https://github.com/saltstack-formulas/postgres-formula/commit/b369aa9>`_\ )
|
||||||
|
|
||||||
|
Continuous Integration
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* merge travis matrix, add ``salt-lint`` & ``rubocop`` to ``lint`` job (\ ` <https://github.com/saltstack-formulas/postgres-formula/commit/7822200>`_\ )
|
||||||
|
* **travis:** merge ``rubocop`` linter into main ``lint`` job (\ ` <https://github.com/saltstack-formulas/postgres-formula/commit/2c82872>`_\ )
|
||||||
|
|
||||||
|
`0.40.3 <https://github.com/saltstack-formulas/postgres-formula/compare/v0.40.2...v0.40.3>`_ (2019-10-10)
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Bug Fixes
|
||||||
|
^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **manage.sls:** fix ``salt-lint`` errors (\ ` <https://github.com/saltstack-formulas/postgres-formula/commit/bf5b4d6>`_\ )
|
||||||
|
* **python.sls:** fix ``salt-lint`` errors (\ ` <https://github.com/saltstack-formulas/postgres-formula/commit/1f3cfcc>`_\ )
|
||||||
|
|
||||||
|
Continuous Integration
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **kitchen:** change ``log_level`` to ``debug`` instead of ``info`` (\ ` <https://github.com/saltstack-formulas/postgres-formula/commit/7ca61f3>`_\ )
|
||||||
|
* **kitchen:** install required packages to bootstrapped ``opensuse`` [skip ci] (\ ` <https://github.com/saltstack-formulas/postgres-formula/commit/76e3e39>`_\ )
|
||||||
|
* **kitchen:** use bootstrapped ``opensuse`` images until ``2019.2.2`` [skip ci] (\ ` <https://github.com/saltstack-formulas/postgres-formula/commit/3a27978>`_\ )
|
||||||
|
* **platform:** add ``arch-base-latest`` (commented out for now) [skip ci] (\ ` <https://github.com/saltstack-formulas/postgres-formula/commit/89e4a34>`_\ )
|
||||||
|
* merge travis matrix, add ``salt-lint`` & ``rubocop`` to ``lint`` job (\ ` <https://github.com/saltstack-formulas/postgres-formula/commit/a0fdd48>`_\ )
|
||||||
|
|
||||||
|
`0.40.2 <https://github.com/saltstack-formulas/postgres-formula/compare/v0.40.1...v0.40.2>`_ (2019-09-13)
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Bug Fixes
|
||||||
|
^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **freebsd:** no libpqdev freebsd package (\ `eca6d97 <https://github.com/saltstack-formulas/postgres-formula/commit/eca6d97>`_\ )
|
||||||
|
|
||||||
|
Continuous Integration
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **yamllint:** add rule ``empty-values`` & use new ``yaml-files`` setting (\ `9796319 <https://github.com/saltstack-formulas/postgres-formula/commit/9796319>`_\ )
|
||||||
|
|
||||||
|
`0.40.1 <https://github.com/saltstack-formulas/postgres-formula/compare/v0.40.0...v0.40.1>`_ (2019-09-11)
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Continuous Integration
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* use ``dist: bionic`` & apply ``opensuse-leap-15`` SCP error workaround (\ `fc6cbe0 <https://github.com/saltstack-formulas/postgres-formula/commit/fc6cbe0>`_\ )
|
||||||
|
|
||||||
|
Documentation
|
||||||
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **pillar.example:** update examples for freebsd (\ `a799214 <https://github.com/saltstack-formulas/postgres-formula/commit/a799214>`_\ )
|
||||||
|
|
||||||
|
`0.40.0 <https://github.com/saltstack-formulas/postgres-formula/compare/v0.39.1...v0.40.0>`_ (2019-09-03)
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Features
|
||||||
|
^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **archlinux:** add support, fixing rendering errors (\ `e970925 <https://github.com/saltstack-formulas/postgres-formula/commit/e970925>`_\ )
|
||||||
|
|
||||||
|
`0.39.1 <https://github.com/saltstack-formulas/postgres-formula/compare/v0.39.0...v0.39.1>`_ (2019-09-01)
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Continuous Integration
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **kitchen+travis:** replace EOL pre-salted images (\ `140928b <https://github.com/saltstack-formulas/postgres-formula/commit/140928b>`_\ )
|
||||||
|
|
||||||
|
Tests
|
||||||
|
^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **inspec:** fix reference to ``suse`` after gem ``train`` update (\ `677adba <https://github.com/saltstack-formulas/postgres-formula/commit/677adba>`_\ )
|
||||||
|
|
||||||
|
`0.39.0 <https://github.com/saltstack-formulas/postgres-formula/compare/v0.38.0...v0.39.0>`_ (2019-08-17)
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Features
|
||||||
|
^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **yamllint:** include for this repo and apply rules throughout (\ `1f0fd92 <https://github.com/saltstack-formulas/postgres-formula/commit/1f0fd92>`_\ )
|
||||||
|
|
||||||
|
`0.38.0 <https://github.com/saltstack-formulas/postgres-formula/compare/v0.37.4...v0.38.0>`_ (2019-07-24)
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Continuous Integration
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **kitchen:** remove ``python*-pip`` installation (\ `d999597 <https://github.com/saltstack-formulas/postgres-formula/commit/d999597>`_\ )
|
||||||
|
* **kitchen+travis:** modify matrix to include ``develop`` platform (\ `3f81439 <https://github.com/saltstack-formulas/postgres-formula/commit/3f81439>`_\ )
|
||||||
|
|
||||||
|
Features
|
||||||
|
^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **debian:** add buster support (\ `904ba27 <https://github.com/saltstack-formulas/postgres-formula/commit/904ba27>`_\ )
|
||||||
|
|
||||||
|
`0.37.4 <https://github.com/saltstack-formulas/postgres-formula/compare/v0.37.3...v0.37.4>`_ (2019-05-31)
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Continuous Integration
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **travis:** reduce matrix down to 6 instances (\ `2ff919f <https://github.com/saltstack-formulas/postgres-formula/commit/2ff919f>`_\ )
|
||||||
|
|
||||||
|
Tests
|
||||||
|
^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **\ ``services_spec``\ :** remove temporary ``suse`` conditional (\ `81165fc <https://github.com/saltstack-formulas/postgres-formula/commit/81165fc>`_\ )
|
||||||
|
* **command_spec:** use cleaner ``match`` string using ``%r`` (\ `a054cea <https://github.com/saltstack-formulas/postgres-formula/commit/a054cea>`_\ )
|
||||||
|
* **locale:** improve test using locale ``en_US.UTF-8`` (\ `7796064 <https://github.com/saltstack-formulas/postgres-formula/commit/7796064>`_\ )
|
||||||
|
|
||||||
|
`0.37.3 <https://github.com/saltstack-formulas/postgres-formula/compare/v0.37.2...v0.37.3>`_ (2019-05-16)
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Bug Fixes
|
||||||
|
^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **freebsd-user:** fix FreeBSD daemon's user for PostgreSQL >= 9.6 (\ `8745365 <https://github.com/saltstack-formulas/postgres-formula/commit/8745365>`_\ ), closes `#263 <https://github.com/saltstack-formulas/postgres-formula/issues/263>`_
|
||||||
|
|
||||||
|
`0.37.2 <https://github.com/saltstack-formulas/postgres-formula/compare/v0.37.1...v0.37.2>`_ (2019-05-12)
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Bug Fixes
|
||||||
|
^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **sysrc-svc:** workaround *BSD minion indefinitely hanging on start (\ `0aa8b4a <https://github.com/saltstack-formulas/postgres-formula/commit/0aa8b4a>`_\ )
|
||||||
|
|
||||||
|
`0.37.1 <https://github.com/saltstack-formulas/postgres-formula/compare/v0.37.0...v0.37.1>`_ (2019-05-06)
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Documentation
|
||||||
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **readme:** fix link for Travis badge (\ `850ca6a <https://github.com/saltstack-formulas/postgres-formula/commit/850ca6a>`_\ )
|
||||||
|
|
||||||
|
`0.37.0 <https://github.com/saltstack-formulas/postgres-formula/compare/v0.36.0...v0.37.0>`_ (2019-05-06)
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Code Refactoring
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **kitchen:** prefer ``kitchen.yml`` to ``.kitchen.yml`` (\ `8f7cbde <https://github.com/saltstack-formulas/postgres-formula/commit/8f7cbde>`_\ )
|
||||||
|
|
||||||
|
Continuous Integration
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **gemfile:** prepare for ``inspec`` testing (\ `157e169 <https://github.com/saltstack-formulas/postgres-formula/commit/157e169>`_\ )
|
||||||
|
* **kitchen:** use pre-salted images as used in ``template-formula`` (\ `611ec11 <https://github.com/saltstack-formulas/postgres-formula/commit/611ec11>`_\ )
|
||||||
|
* **kitchen+travis:** use newly available pre-salted images (\ `7b7aadc <https://github.com/saltstack-formulas/postgres-formula/commit/7b7aadc>`_\ )
|
||||||
|
* **pillar_from_files:** use custom pillar based on ``pillar.example`` (\ `c64d9e4 <https://github.com/saltstack-formulas/postgres-formula/commit/c64d9e4>`_\ )
|
||||||
|
* **travis:** add ``.travis.yml`` based on ``template-formula`` (\ `6467df7 <https://github.com/saltstack-formulas/postgres-formula/commit/6467df7>`_\ )
|
||||||
|
|
||||||
|
Documentation
|
||||||
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **readme:** update ``Testing`` section for ``inspec`` (\ `4cfde8d <https://github.com/saltstack-formulas/postgres-formula/commit/4cfde8d>`_\ )
|
||||||
|
|
||||||
|
Features
|
||||||
|
^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* implement ``semantic-release`` (\ `7d3aa19 <https://github.com/saltstack-formulas/postgres-formula/commit/7d3aa19>`_\ )
|
||||||
|
|
||||||
|
Tests
|
||||||
|
^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
* **inspec:** add tests for multiple ports and postgres versions (\ `bf6a653 <https://github.com/saltstack-formulas/postgres-formula/commit/bf6a653>`_\ )
|
||||||
|
* **inspec:** enable ``use_upstream_repo`` for ``debian`` & ``centos-6`` (\ `49fdd33 <https://github.com/saltstack-formulas/postgres-formula/commit/49fdd33>`_\ )
|
||||||
|
* **inspec:** replace ``serverspec`` with ``inspec`` tests (\ `58ac122 <https://github.com/saltstack-formulas/postgres-formula/commit/58ac122>`_\ )
|
||||||
|
* **inspec:** use relaxed command output match for the time being (\ `3c53684 <https://github.com/saltstack-formulas/postgres-formula/commit/3c53684>`_\ )
|
||||||
167
docs/README.rst
Normal file
167
docs/README.rst
Normal file
@@ -0,0 +1,167 @@
|
|||||||
|
.. _readme:
|
||||||
|
|
||||||
|
postgres-formula
|
||||||
|
================
|
||||||
|
|
||||||
|
|img_travis| |img_sr|
|
||||||
|
|
||||||
|
.. |img_travis| image:: https://travis-ci.com/saltstack-formulas/postgres-formula.svg?branch=master
|
||||||
|
:alt: Travis CI Build Status
|
||||||
|
:scale: 100%
|
||||||
|
:target: https://travis-ci.com/saltstack-formulas/postgres-formula
|
||||||
|
.. |img_sr| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
|
||||||
|
:alt: Semantic Release
|
||||||
|
:scale: 100%
|
||||||
|
:target: https://github.com/semantic-release/semantic-release
|
||||||
|
|
||||||
|
A formula to install and configure PostgreSQL server.
|
||||||
|
|
||||||
|
.. contents:: **Table of Contents**
|
||||||
|
|
||||||
|
General notes
|
||||||
|
-------------
|
||||||
|
|
||||||
|
See the full `SaltStack Formulas installation and usage instructions
|
||||||
|
<https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_.
|
||||||
|
|
||||||
|
If you are interested in writing or contributing to formulas, please pay attention to the `Writing Formula Section
|
||||||
|
<https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#writing-formulas>`_.
|
||||||
|
|
||||||
|
If you want to use this formula, please pay attention to the ``FORMULA`` file and/or ``git tag``,
|
||||||
|
which contains the currently released version. This formula is versioned according to `Semantic Versioning <http://semver.org/>`_.
|
||||||
|
|
||||||
|
See `Formula Versioning Section <https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#versioning>`_ for more details.
|
||||||
|
|
||||||
|
Contributing to this repo
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
**Commit message formatting is significant!!**
|
||||||
|
|
||||||
|
Please see `How to contribute <https://github.com/saltstack-formulas/.github/blob/master/CONTRIBUTING.rst>`_ for more details.
|
||||||
|
|
||||||
|
Available states
|
||||||
|
----------------
|
||||||
|
|
||||||
|
.. contents::
|
||||||
|
:local:
|
||||||
|
|
||||||
|
``postgres``
|
||||||
|
^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Installs and configures both PostgreSQL server and client with creation of various DB objects in
|
||||||
|
the cluster. This state applies to both Linux and MacOS.
|
||||||
|
|
||||||
|
``postgres.client``
|
||||||
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Installs the PostgreSQL client binaries and libraries on Linux.
|
||||||
|
|
||||||
|
``postgres.manage``
|
||||||
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Creates such DB objects as: users, tablespaces, databases, schemas and extensions.
|
||||||
|
See ``pillar.example`` file for details.
|
||||||
|
|
||||||
|
``postgres.python``
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Installs the PostgreSQL adapter for Python on Linux.
|
||||||
|
|
||||||
|
``postgres.server``
|
||||||
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Installs the PostgreSQL server package on Linux, prepares the DB cluster and starts the server using
|
||||||
|
packaged init script, job or unit.
|
||||||
|
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
For PostgreSQL server before version 10 to work inside a **FreeBSD Jail**
|
||||||
|
set ``sysvshm=new`` and ``sysvsem=new``.
|
||||||
|
DO NOT SET ``allow.sysvipc=1``. It defeats the purpose of using Jails.
|
||||||
|
|
||||||
|
Further information: https://blog.tyk.nu/blog/freebsd-jails-and-sysv-ipc/
|
||||||
|
|
||||||
|
|
||||||
|
**Running inside a container** (using Packer, Docker or similar tools), when OS ``init`` process
|
||||||
|
is not available to start the service and enable it on "boot", set pillar value:
|
||||||
|
|
||||||
|
.. code:: yaml
|
||||||
|
|
||||||
|
postgres:
|
||||||
|
bake_image: True
|
||||||
|
|
||||||
|
This toggles starting PostgreSQL daemon by issuing raw ``pg_ctl`` or ``pg_ctlcluster`` command.
|
||||||
|
|
||||||
|
``postgres.upstream``
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Configures the PostgreSQL Official (upstream) repository on target system if
|
||||||
|
applicable.
|
||||||
|
|
||||||
|
The state relies on the ``postgres:use_upstream_repo`` Pillar value which could be set as following:
|
||||||
|
|
||||||
|
* ``True`` (default): adds the upstream repository to install packages from
|
||||||
|
* ``False``: makes sure that the repository configuration is absent
|
||||||
|
* ``'postgresapp'`` (MacOS) uses upstream PostgresApp package repository.
|
||||||
|
* ``'homebrew'`` (MacOS) uses Homebrew postgres
|
||||||
|
|
||||||
|
The ``postgres:version`` Pillar controls which version of the PostgreSQL packages should be
|
||||||
|
installed from the upstream Linux repository. Defaults to ``9.5``.
|
||||||
|
|
||||||
|
|
||||||
|
Removal states
|
||||||
|
--------------
|
||||||
|
|
||||||
|
``postgres.dropped``
|
||||||
|
^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Meta state to remove Postgres software. By default the release installed by formula is targeted only. To target multiple releases, set pillar ``postgres.remove.multiple_releases: True``.
|
||||||
|
|
||||||
|
``postgres.server.remove``
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Remove server, lib, and contrib packages. The ``postgres.server.remove`` will retain data by default (no data loss) - set pillar ``postgres.remove.data: True`` to remove data and configuration directories also.
|
||||||
|
|
||||||
|
``postgres.client.remove``
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Remove client package.
|
||||||
|
|
||||||
|
``postgres.dev.remove``
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Remove development and python packages.
|
||||||
|
|
||||||
|
|
||||||
|
Testing
|
||||||
|
-------
|
||||||
|
|
||||||
|
Linux testing is done with ``kitchen-salt``.
|
||||||
|
|
||||||
|
``kitchen converge``
|
||||||
|
^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Creates the docker instance and runs the ``postgres`` main state, ready for testing.
|
||||||
|
|
||||||
|
``kitchen verify``
|
||||||
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Runs the ``inspec`` tests on the actual instance.
|
||||||
|
|
||||||
|
``kitchen destroy``
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Removes the docker instance.
|
||||||
|
|
||||||
|
``kitchen test``
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``verify`` + ``destroy``.
|
||||||
|
|
||||||
|
``kitchen login``
|
||||||
|
^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Gives you SSH access to the instance for manual testing.
|
||||||
|
|
||||||
|
.. vim: fenc=utf-8 spell spl=en cc=100 tw=99 fo=want sts=2 sw=2 et
|
||||||
518
docs/TOFS_pattern.rst
Normal file
518
docs/TOFS_pattern.rst
Normal file
@@ -0,0 +1,518 @@
|
|||||||
|
.. _tofs_pattern:
|
||||||
|
|
||||||
|
TOFS: A pattern for using SaltStack
|
||||||
|
===================================
|
||||||
|
|
||||||
|
.. list-table::
|
||||||
|
:name: tofs-authors
|
||||||
|
:header-rows: 1
|
||||||
|
:stub-columns: 1
|
||||||
|
:widths: 2,2,3,2
|
||||||
|
|
||||||
|
* -
|
||||||
|
- Person
|
||||||
|
- Contact
|
||||||
|
- Date
|
||||||
|
* - Authored by
|
||||||
|
- Roberto Moreda
|
||||||
|
- moreda@allenta.com
|
||||||
|
- 29/12/2014
|
||||||
|
* - Modified by
|
||||||
|
- Daniel Dehennin
|
||||||
|
- daniel.dehennin@baby-gnu.org
|
||||||
|
- 07/02/2019
|
||||||
|
* - Modified by
|
||||||
|
- Imran Iqbal
|
||||||
|
- https://github.com/myii
|
||||||
|
- 23/02/2019
|
||||||
|
|
||||||
|
All that follows is a proposal based on my experience with `SaltStack <http://www.saltstack.com/>`_. The good thing of a piece of software like this is that you can "bend it" to suit your needs in many possible ways, and this is one of them. All the recommendations and thoughts are given "as it is" with no warranty of any type.
|
||||||
|
|
||||||
|
.. contents:: **Table of Contents**
|
||||||
|
|
||||||
|
Usage of values in pillar vs templates in ``file_roots``
|
||||||
|
--------------------------------------------------------
|
||||||
|
|
||||||
|
Among other functions, the *master* (or *salt-master*) serves files to the *minions* (or *salt-minions*). The `file_roots <http://docs.saltstack.com/en/latest/ref/file_server/file_roots.html>`_ is the list of directories used in sequence to find a file when a minion requires it: the first match is served to the minion. Those files could be `state files <http://docs.saltstack.com/en/latest/topics/tutorials/starting_states.html>`_ or configuration templates, among others.
|
||||||
|
|
||||||
|
Using SaltStack is a simple and effective way to implement configuration management, but even in a `non-multitenant <http://en.wikipedia.org/wiki/Multitenancy>`_ scenario, it is not a good idea to generally access some data (e.g. the database password in our `Zabbix <http://www.zabbix.com/>`_ server configuration file or the private key of our `Nginx <http://nginx.org/en/>`_ TLS certificate).
|
||||||
|
|
||||||
|
To avoid this situation we can use the `pillar mechanism <http://docs.saltstack.com/en/latest/topics/pillar/>`_, which is designed to provide controlled access to data from the minions based on some selection rules. As pillar data could be easily integrated in the `Jinja <http://docs.saltstack.com/en/latest/topics/tutorials/pillar.html>`_ templates, it is a good mechanism to store values to be used in the final rendering of state files and templates.
|
||||||
|
|
||||||
|
There are a variety of approaches on the usage of pillar and templates as seen in the `saltstack-formulas <https://github.com/saltstack-formulas>`_' repositories. `Some <https://github.com/saltstack-formulas/nginx-formula/pull/18>`_ `developments <https://github.com/saltstack-formulas/php-formula/pull/14>`_ stress the initial purpose of pillar data into a storage for most of the possible variables for a determined system configuration. This, in my opinion, is shifting too much load from the original template files approach. Adding up some `non-trivial Jinja <https://github.com/saltstack-formulas/nginx-formula/blob/f74254c07e188bd448eaf1c5f9c802d78c4c005e/nginx/files/default/nginx.conf>`_ code as essential part of composing the state file definitely makes SaltStack state files (hence formulas) more difficult to read. The extreme of this approach is that we could end up with a new render mechanism, implemented in Jinja, storing everything needed in pillar data to compose configurations. Additionally, we are establishing a strong dependency with the Jinja renderer.
|
||||||
|
|
||||||
|
In opposition to the *put the code in file_roots and the data in pillars* approach, there is the *pillar as a store for a set of key-values* approach. A full-blown configuration file abstracted in pillar and jinja is complicated to develop, understand and maintain. I think a better and simpler approach is to keep a configuration file templated using just a basic (non-extensive but extensible) set of pillar values.
|
||||||
|
|
||||||
|
On the reusability of SaltStack state files
|
||||||
|
-------------------------------------------
|
||||||
|
|
||||||
|
There is a brilliant initiative of the SaltStack community called `salt-formulas <https://github.com/saltstack-formulas>`_. Their goal is to provide state files, pillar examples and configuration templates ready to be used for provisioning. I am a contributor for two small ones: `zabbix-formula <https://github.com/saltstack-formulas/zabbix-formula>`_ and `varnish-formula <https://github.com/saltstack-formulas/varnish-formula>`_.
|
||||||
|
|
||||||
|
The `design guidelines <http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_ for formulas are clear in many aspects and it is a recommended reading for anyone willing to write state files, even non-formulaic ones.
|
||||||
|
|
||||||
|
In the next section, I am going to describe my proposal to extend further the reusability of formulas, suggesting some patterns of usage.
|
||||||
|
|
||||||
|
The Template Override and Files Switch (TOFS) pattern
|
||||||
|
-----------------------------------------------------
|
||||||
|
|
||||||
|
I understand a formula as a **complete, independent set of SaltStack state and configuration template files sufficient to configure a system**. A system could be something as simple as an NTP server or some other much more complex service that requires many state and configuration template files.
|
||||||
|
|
||||||
|
The customization of a formula should be done mainly by providing pillar data used later to render either the state or the configuration template files.
|
||||||
|
|
||||||
|
Example: NTP before applying TOFS
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Let's work with the NTP example. A basic formula that follows the `design guidelines <http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_ has the following files and directories tree:
|
||||||
|
|
||||||
|
.. code-block:: console
|
||||||
|
|
||||||
|
/srv/saltstack/salt-formulas/ntp-saltstack-formula/
|
||||||
|
ntp/
|
||||||
|
map.jinja
|
||||||
|
init.sls
|
||||||
|
conf.sls
|
||||||
|
files/
|
||||||
|
default/
|
||||||
|
etc/
|
||||||
|
ntp.conf.jinja
|
||||||
|
|
||||||
|
In order to use it, let's assume a `masterless configuration <http://docs.saltstack.com/en/latest/topics/tutorials/quickstart.html>`_ and this relevant section of ``/etc/salt/minion``:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
pillar_roots:
|
||||||
|
base:
|
||||||
|
- /srv/saltstack/pillar
|
||||||
|
file_client: local
|
||||||
|
file_roots:
|
||||||
|
base:
|
||||||
|
- /srv/saltstack/salt
|
||||||
|
- /srv/saltstack/salt-formulas/ntp-saltstack-formula
|
||||||
|
|
||||||
|
.. code-block:: jinja
|
||||||
|
|
||||||
|
{#- /srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/map.jinja #}
|
||||||
|
{%- set ntp = salt['grains.filter_by']({
|
||||||
|
'default': {
|
||||||
|
'pkg': 'ntp',
|
||||||
|
'service': 'ntp',
|
||||||
|
'config': '/etc/ntp.conf',
|
||||||
|
},
|
||||||
|
}, merge=salt['pillar.get']('ntp:lookup')) %}
|
||||||
|
|
||||||
|
In ``init.sls`` we have the minimal states required to have NTP configured. In many cases ``init.sls`` is almost equivalent to an ``apt-get install`` or a ``yum install`` of the package.
|
||||||
|
|
||||||
|
.. code-block:: sls
|
||||||
|
|
||||||
|
## /srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/init.sls
|
||||||
|
{%- from 'ntp/map.jinja' import ntp with context %}
|
||||||
|
|
||||||
|
Install NTP:
|
||||||
|
pkg.installed:
|
||||||
|
- name: {{ ntp.pkg }}
|
||||||
|
|
||||||
|
Enable and start NTP:
|
||||||
|
service.running:
|
||||||
|
- name: {{ ntp.service }}
|
||||||
|
- enabled: True
|
||||||
|
- require:
|
||||||
|
- pkg: Install NTP package
|
||||||
|
|
||||||
|
In ``conf.sls`` we have the configuration states. In most cases, that is just managing configuration file templates and making them to be watched by the service.
|
||||||
|
|
||||||
|
.. code-block:: sls
|
||||||
|
|
||||||
|
## /srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/conf.sls
|
||||||
|
include:
|
||||||
|
- ntp
|
||||||
|
|
||||||
|
{%- from 'ntp/map.jinja' import ntp with context %}
|
||||||
|
|
||||||
|
Configure NTP:
|
||||||
|
file.managed:
|
||||||
|
- name: {{ ntp.config }}
|
||||||
|
- template: jinja
|
||||||
|
- source: salt://ntp/files/default/etc/ntp.conf.jinja
|
||||||
|
- watch_in:
|
||||||
|
- service: Enable and start NTP service
|
||||||
|
- require:
|
||||||
|
- pkg: Install NTP package
|
||||||
|
|
||||||
|
Under ``files/default``, there is a structure that mimics the one in the minion in order to avoid clashes and confusion on where to put the needed templates. There you can find a mostly standard template for the configuration file.
|
||||||
|
|
||||||
|
.. code-block:: jinja
|
||||||
|
|
||||||
|
{#- /srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/files/default/etc/ntp.conf.jinja #}
|
||||||
|
{#- Managed by saltstack #}
|
||||||
|
{#- Edit pillars or override this template in saltstack if you need customization #}
|
||||||
|
{%- set settings = salt['pillar.get']('ntp', {}) %}
|
||||||
|
{%- set default_servers = ['0.ubuntu.pool.ntp.org',
|
||||||
|
'1.ubuntu.pool.ntp.org',
|
||||||
|
'2.ubuntu.pool.ntp.org',
|
||||||
|
'3.ubuntu.pool.ntp.org'] %}
|
||||||
|
|
||||||
|
driftfile /var/lib/ntp/ntp.drift
|
||||||
|
statistics loopstats peerstats clockstats
|
||||||
|
filegen loopstats file loopstats type day enable
|
||||||
|
filegen peerstats file peerstats type day enable
|
||||||
|
filegen clockstats file clockstats type day enable
|
||||||
|
|
||||||
|
{%- for server in settings.get('servers', default_servers) %}
|
||||||
|
server {{ server }}
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
|
restrict -4 default kod notrap nomodify nopeer noquery
|
||||||
|
restrict -6 default kod notrap nomodify nopeer noquery
|
||||||
|
|
||||||
|
restrict 127.0.0.1
|
||||||
|
restrict ::1
|
||||||
|
|
||||||
|
With all this, it is easy to install and configure a simple NTP server by just running ``salt-call state.sls ntp.conf``: the package will be installed, the service will be running and the configuration should be correct for most of cases, even without pillar data.
|
||||||
|
|
||||||
|
Alternatively, you can define a highstate in ``/srv/saltstack/salt/top.sls`` and run ``salt-call state.highstate``.
|
||||||
|
|
||||||
|
.. code-block:: sls
|
||||||
|
|
||||||
|
## /srv/saltstack/salt/top.sls
|
||||||
|
base:
|
||||||
|
'*':
|
||||||
|
- ntp.conf
|
||||||
|
|
||||||
|
**Customizing the formula just with pillar data**, we have the option to define the NTP servers.
|
||||||
|
|
||||||
|
.. code-block:: sls
|
||||||
|
|
||||||
|
## /srv/saltstack/pillar/top.sls
|
||||||
|
base:
|
||||||
|
'*':
|
||||||
|
- ntp
|
||||||
|
|
||||||
|
.. code-block:: sls
|
||||||
|
|
||||||
|
## /srv/saltstack/pillar/ntp.sls
|
||||||
|
ntp:
|
||||||
|
servers:
|
||||||
|
- 0.ch.pool.ntp.org
|
||||||
|
- 1.ch.pool.ntp.org
|
||||||
|
- 2.ch.pool.ntp.org
|
||||||
|
- 3.ch.pool.ntp.org
|
||||||
|
|
||||||
|
Template Override
|
||||||
|
^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
If the customization based on pillar data is not enough, we can override the template by creating a new one in ``/srv/saltstack/salt/ntp/files/default/etc/ntp.conf.jinja``
|
||||||
|
|
||||||
|
.. code-block:: jinja
|
||||||
|
|
||||||
|
{#- /srv/saltstack/salt/ntp/files/default/etc/ntp.conf.jinja #}
|
||||||
|
{#- Managed by saltstack #}
|
||||||
|
{#- Edit pillars or override this template in saltstack if you need customization #}
|
||||||
|
|
||||||
|
{#- Some bizarre configurations here #}
|
||||||
|
{#- ... #}
|
||||||
|
|
||||||
|
{%- for server in settings.get('servers', default_servers) %}
|
||||||
|
server {{ server }}
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
|
This way we are locally **overriding the template files** offered by the formula in order to make a more complex adaptation. Of course, this could be applied as well to any of the files, including the state files.
|
||||||
|
|
||||||
|
Files Switch
|
||||||
|
^^^^^^^^^^^^
|
||||||
|
|
||||||
|
To bring some order into the set of template files included in a formula, as we commented, we suggest having a similar structure to a normal final file system under ``files/default``.
|
||||||
|
|
||||||
|
We can make different templates coexist for different minions, classified by any `grain <http://docs.saltstack.com/en/latest/topics/targeting/grains.html>`_ value, by simply creating new directories under ``files``. This mechanism is based on **using values of some grains as a switch for the directories under** ``files/``.
|
||||||
|
|
||||||
|
If we decide that we want ``os_family`` as switch, then we could provide the formula template variants for both the ``RedHat`` and ``Debian`` families.
|
||||||
|
|
||||||
|
.. code-block:: console
|
||||||
|
|
||||||
|
/srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/files/
|
||||||
|
default/
|
||||||
|
etc/
|
||||||
|
ntp.conf.jinja
|
||||||
|
RedHat/
|
||||||
|
etc/
|
||||||
|
ntp.conf.jinja
|
||||||
|
Debian/
|
||||||
|
etc/
|
||||||
|
ntp.conf.jinja
|
||||||
|
|
||||||
|
To make this work we need a ``conf.sls`` state file that takes a list of possible files as the configuration template.
|
||||||
|
|
||||||
|
.. code-block:: sls
|
||||||
|
|
||||||
|
## /srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/conf.sls
|
||||||
|
include:
|
||||||
|
- ntp
|
||||||
|
|
||||||
|
{%- from 'ntp/map.jinja' import ntp with context %}
|
||||||
|
|
||||||
|
Configure NTP:
|
||||||
|
file.managed:
|
||||||
|
- name: {{ ntp.config }}
|
||||||
|
- template: jinja
|
||||||
|
- source:
|
||||||
|
- salt://ntp/files/{{ grains.get('os_family', 'default') }}/etc/ntp.conf.jinja
|
||||||
|
- salt://ntp/files/default/etc/ntp.conf.jinja
|
||||||
|
- watch_in:
|
||||||
|
- service: Enable and start NTP service
|
||||||
|
- require:
|
||||||
|
- pkg: Install NTP package
|
||||||
|
|
||||||
|
If we want to cover the possibility of a special template for a minion identified by ``node01`` then we could have a specific template in ``/srv/saltstack/salt/ntp/files/node01/etc/ntp.conf.jinja``.
|
||||||
|
|
||||||
|
.. code-block:: jinja
|
||||||
|
|
||||||
|
{#- /srv/saltstack/salt/ntp/files/node01/etc/ntp.conf.jinja #}
|
||||||
|
{#- Managed by saltstack #}
|
||||||
|
{#- Edit pillars or override this template in saltstack if you need customization #}
|
||||||
|
|
||||||
|
{#- Some crazy configurations here for node01 #}
|
||||||
|
{#- ... #}
|
||||||
|
|
||||||
|
To make this work we could write a specially crafted ``conf.sls``.
|
||||||
|
|
||||||
|
.. code-block:: sls
|
||||||
|
|
||||||
|
## /srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/conf.sls
|
||||||
|
include:
|
||||||
|
- ntp
|
||||||
|
|
||||||
|
{%- from 'ntp/map.jinja' import ntp with context %}
|
||||||
|
|
||||||
|
Configure NTP:
|
||||||
|
file.managed:
|
||||||
|
- name: {{ ntp.config }}
|
||||||
|
- template: jinja
|
||||||
|
- source:
|
||||||
|
- salt://ntp/files/{{ grains.get('id') }}/etc/ntp.conf.jinja
|
||||||
|
- salt://ntp/files/{{ grains.get('os_family') }}/etc/ntp.conf.jinja
|
||||||
|
- salt://ntp/files/default/etc/ntp.conf.jinja
|
||||||
|
- watch_in:
|
||||||
|
- service: Enable and start NTP service
|
||||||
|
- require:
|
||||||
|
- pkg: Install NTP package
|
||||||
|
|
||||||
|
Using the ``files_switch`` macro
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
We can simplify the ``conf.sls`` with the new ``files_switch`` macro to use in the ``source`` parameter for the ``file.managed`` state.
|
||||||
|
|
||||||
|
.. code-block:: sls
|
||||||
|
|
||||||
|
## /srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/conf.sls
|
||||||
|
include:
|
||||||
|
- ntp
|
||||||
|
|
||||||
|
{%- set tplroot = tpldir.split('/')[0] %}
|
||||||
|
{%- from 'ntp/map.jinja' import ntp with context %}
|
||||||
|
{%- from 'ntp/libtofs.jinja' import files_switch %}
|
||||||
|
|
||||||
|
Configure NTP:
|
||||||
|
file.managed:
|
||||||
|
- name: {{ ntp.config }}
|
||||||
|
- template: jinja
|
||||||
|
- source: {{ files_switch(['/etc/ntp.conf.jinja'],
|
||||||
|
lookup='Configure NTP'
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
- watch_in:
|
||||||
|
- service: Enable and start NTP service
|
||||||
|
- require:
|
||||||
|
- pkg: Install NTP package
|
||||||
|
|
||||||
|
|
||||||
|
* This uses ``config.get``, searching for ``ntp:tofs:source_files:Configure NTP`` to determine the list of template files to use.
|
||||||
|
* If this returns a result, the default of ``['/etc/ntp.conf.jinja']`` will be appended to it.
|
||||||
|
* If this does not yield any results, the default of ``['/etc/ntp.conf.jinja']`` will be used.
|
||||||
|
|
||||||
|
In ``libtofs.jinja``, we define this new macro ``files_switch``.
|
||||||
|
|
||||||
|
.. literalinclude:: ../template/libtofs.jinja
|
||||||
|
:caption: /srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/libtofs.jinja
|
||||||
|
:language: jinja
|
||||||
|
|
||||||
|
How to customise the ``source`` further
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The examples below are based on an ``Ubuntu`` minion called ``theminion`` being configured via. pillar.
|
||||||
|
|
||||||
|
Using the default settings of the ``files_switch`` macro above,
|
||||||
|
the ``source`` will be:
|
||||||
|
|
||||||
|
.. code-block:: sls
|
||||||
|
|
||||||
|
- source:
|
||||||
|
- salt://ntp/files/theminion/etc/ntp.conf.jinja
|
||||||
|
- salt://ntp/files/Debian/etc/ntp.conf.jinja
|
||||||
|
- salt://ntp/files/default/etc/ntp.conf.jinja
|
||||||
|
|
||||||
|
Customise ``files``
|
||||||
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
The ``files`` portion can be customised:
|
||||||
|
|
||||||
|
.. code-block:: sls
|
||||||
|
|
||||||
|
ntp:
|
||||||
|
tofs:
|
||||||
|
dirs:
|
||||||
|
files: files_alt
|
||||||
|
|
||||||
|
Resulting in:
|
||||||
|
|
||||||
|
.. code-block:: sls
|
||||||
|
|
||||||
|
- source:
|
||||||
|
- salt://ntp/files_alt/theminion/etc/ntp.conf.jinja
|
||||||
|
- salt://ntp/files_alt/Debian/etc/ntp.conf.jinja
|
||||||
|
- salt://ntp/files_alt/default/etc/ntp.conf.jinja
|
||||||
|
|
||||||
|
Customise the use of grains
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Grains can be customised and even arbitrary paths can be supplied:
|
||||||
|
|
||||||
|
.. code-block:: sls
|
||||||
|
|
||||||
|
ntp:
|
||||||
|
tofs:
|
||||||
|
files_switch:
|
||||||
|
- any/path/can/be/used/here
|
||||||
|
- id
|
||||||
|
- os
|
||||||
|
- os_family
|
||||||
|
|
||||||
|
Resulting in:
|
||||||
|
|
||||||
|
.. code-block:: sls
|
||||||
|
|
||||||
|
- source:
|
||||||
|
- salt://ntp/files/any/path/can/be/used/here/etc/ntp.conf.jinja
|
||||||
|
- salt://ntp/files/theminion/etc/ntp.conf.jinja
|
||||||
|
- salt://ntp/files/Ubuntu/etc/ntp.conf.jinja
|
||||||
|
- salt://ntp/files/Debian/etc/ntp.conf.jinja
|
||||||
|
- salt://ntp/files/default/etc/ntp.conf.jinja
|
||||||
|
|
||||||
|
Customise the ``default`` path
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
The ``default`` portion of the path can be customised:
|
||||||
|
|
||||||
|
.. code-block:: sls
|
||||||
|
|
||||||
|
ntp:
|
||||||
|
tofs:
|
||||||
|
dirs:
|
||||||
|
default: default_alt
|
||||||
|
|
||||||
|
Resulting in:
|
||||||
|
|
||||||
|
.. code-block:: sls
|
||||||
|
|
||||||
|
- source:
|
||||||
|
...
|
||||||
|
- salt://ntp/files/default_alt/etc/ntp.conf.jinja
|
||||||
|
|
||||||
|
Customise the list of ``source_files``
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
The list of ``source_files`` can be given:
|
||||||
|
|
||||||
|
.. code-block:: sls
|
||||||
|
|
||||||
|
ntp:
|
||||||
|
tofs:
|
||||||
|
source_files:
|
||||||
|
Configure NTP:
|
||||||
|
- '/etc/ntp.conf_alt.jinja'
|
||||||
|
|
||||||
|
Resulting in:
|
||||||
|
|
||||||
|
.. code-block:: sls
|
||||||
|
|
||||||
|
- source:
|
||||||
|
- salt://ntp/files/theminion/etc/ntp.conf_alt.jinja
|
||||||
|
- salt://ntp/files/theminion/etc/ntp.conf.jinja
|
||||||
|
- salt://ntp/files/Debian/etc/ntp.conf_alt.jinja
|
||||||
|
- salt://ntp/files/Debian/etc/ntp.conf.jinja
|
||||||
|
- salt://ntp/files/default/etc/ntp.conf_alt.jinja
|
||||||
|
- salt://ntp/files/default/etc/ntp.conf.jinja
|
||||||
|
|
||||||
|
Note: This does *not* override the default value.
|
||||||
|
Rather, the value from the pillar/config is prepended to the default.
|
||||||
|
|
||||||
|
Using sub-directories for ``components``
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
If your formula is composed of several components, you may prefer to provides files under sub-directories, like in the `systemd-formula <https://github.com/saltstack-formulas/systemd-formula>`_.
|
||||||
|
|
||||||
|
.. code-block:: console
|
||||||
|
|
||||||
|
/srv/saltstack/systemd-formula/
|
||||||
|
systemd/
|
||||||
|
init.sls
|
||||||
|
libtofs.jinja
|
||||||
|
map.jinja
|
||||||
|
networkd/
|
||||||
|
init.sls
|
||||||
|
files/
|
||||||
|
default/
|
||||||
|
network/
|
||||||
|
99-default.link
|
||||||
|
resolved/
|
||||||
|
init.sls
|
||||||
|
files/
|
||||||
|
default/
|
||||||
|
resolved.conf
|
||||||
|
timesyncd/
|
||||||
|
init.sls
|
||||||
|
files/
|
||||||
|
Arch/
|
||||||
|
resolved.conf
|
||||||
|
Debian/
|
||||||
|
resolved.conf
|
||||||
|
default/
|
||||||
|
resolved.conf
|
||||||
|
Ubuntu/
|
||||||
|
resolved.conf
|
||||||
|
|
||||||
|
For example, the following ``formula.component.config`` SLS:
|
||||||
|
|
||||||
|
.. code-block:: sls
|
||||||
|
|
||||||
|
{%- from "formula/libtofs.jinja" import files_switch with context %}
|
||||||
|
|
||||||
|
formula configuration file:
|
||||||
|
file.managed:
|
||||||
|
- name: /etc/formula.conf
|
||||||
|
- user: root
|
||||||
|
- group: root
|
||||||
|
- mode: 644
|
||||||
|
- template: jinja
|
||||||
|
- source: {{ files_switch(['formula.conf'],
|
||||||
|
lookup='formula',
|
||||||
|
use_subpath=True
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
|
||||||
|
will be rendered on a ``Debian`` minion named ``salt-formula.ci.local`` as:
|
||||||
|
|
||||||
|
.. code-block:: sls
|
||||||
|
|
||||||
|
formula configuration file:
|
||||||
|
file.managed:
|
||||||
|
- name: /etc/formula.conf
|
||||||
|
- user: root
|
||||||
|
- group: root
|
||||||
|
- mode: 644
|
||||||
|
- template: jinja
|
||||||
|
- source:
|
||||||
|
- salt://formula/component/files/salt-formula.ci.local/formula.conf
|
||||||
|
- salt://formula/component/files/Debian/formula.conf
|
||||||
|
- salt://formula/component/files/default/formula.conf
|
||||||
|
- salt://formula/files/salt-formula.ci.local/formula.conf
|
||||||
|
- salt://formula/files/Debian/formula.conf
|
||||||
|
- salt://formula/files/default/formula.conf
|
||||||
17
kitchen.vagrant.yml
Normal file
17
kitchen.vagrant.yml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=yaml
|
||||||
|
---
|
||||||
|
driver:
|
||||||
|
name: vagrant
|
||||||
|
|
||||||
|
platforms:
|
||||||
|
- name: freebsd-120-2019-2-py3
|
||||||
|
driver:
|
||||||
|
box_url: https://freebsd.z.vstack.com/FreeBSD-12.0.box
|
||||||
|
cache_directory: false
|
||||||
|
customize:
|
||||||
|
usbxhci: 'off'
|
||||||
|
gui: false
|
||||||
|
linked_clone: true
|
||||||
|
ssh:
|
||||||
|
shell: '/bin/sh'
|
||||||
166
kitchen.yml
Normal file
166
kitchen.yml
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=yaml
|
||||||
|
---
|
||||||
|
# For help on this file's format, see https://kitchen.ci/
|
||||||
|
driver:
|
||||||
|
name: docker
|
||||||
|
use_sudo: false
|
||||||
|
privileged: true
|
||||||
|
run_command: /lib/systemd/systemd
|
||||||
|
|
||||||
|
# Make sure the platforms listed below match up with
|
||||||
|
# the `env.matrix` instances defined in `.travis.yml`
|
||||||
|
platforms:
|
||||||
|
## SALT `master`
|
||||||
|
- name: debian-10-master-py3
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-master-py3:debian-10
|
||||||
|
- name: ubuntu-2004-master-py3
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-master-py3:ubuntu-20.04
|
||||||
|
- name: ubuntu-1804-master-py3
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-master-py3:ubuntu-18.04
|
||||||
|
- name: centos-8-master-py3
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-master-py3:centos-8
|
||||||
|
- name: fedora-32-master-py3
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-master-py3:fedora-32
|
||||||
|
- name: fedora-31-master-py3
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-master-py3:fedora-31
|
||||||
|
- name: opensuse-leap-152-master-py3
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-master-py3:opensuse-leap-15.2
|
||||||
|
run_command: /usr/lib/systemd/systemd
|
||||||
|
# Workaround to avoid intermittent failures on `opensuse-leap-15.2`:
|
||||||
|
# => SCP did not finish successfully (255): (Net::SCP::Error)
|
||||||
|
transport:
|
||||||
|
max_ssh_sessions: 1
|
||||||
|
- name: amazonlinux-2-master-py3
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-master-py3:amazonlinux-2
|
||||||
|
|
||||||
|
## SALT `3000.3`
|
||||||
|
- name: debian-10-3000-3-py3
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-3000.3-py3:debian-10
|
||||||
|
- name: debian-9-3000-3-py3
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-3000.3-py3:debian-9
|
||||||
|
- name: ubuntu-1804-3000-3-py3
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-3000.3-py3:ubuntu-18.04
|
||||||
|
- name: centos-8-3000-3-py3
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-3000.3-py3:centos-8
|
||||||
|
- name: centos-7-3000-3-py3
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-3000.3-py3:centos-7
|
||||||
|
- name: fedora-31-3000-3-py3
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-3000.3-py3:fedora-31
|
||||||
|
- name: opensuse-leap-152-3000-3-py3
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-3000.3-py3:opensuse-leap-15.2
|
||||||
|
run_command: /usr/lib/systemd/systemd
|
||||||
|
# Workaround to avoid intermittent failures on `opensuse-leap-15.2`:
|
||||||
|
# => SCP did not finish successfully (255): (Net::SCP::Error)
|
||||||
|
transport:
|
||||||
|
max_ssh_sessions: 1
|
||||||
|
- name: amazonlinux-2-3000-3-py3
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-3000.3-py3:amazonlinux-2
|
||||||
|
- name: ubuntu-1804-3000-3-py2
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-3000.3-py2:ubuntu-18.04
|
||||||
|
- name: ubuntu-1604-3000-3-py2
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-3000.3-py2:ubuntu-16.04
|
||||||
|
- name: arch-base-latest-3000-3-py2
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-3000.3-py2:arch-base-latest
|
||||||
|
run_command: /usr/lib/systemd/systemd
|
||||||
|
|
||||||
|
## SALT `2019.2`
|
||||||
|
- name: debian-10-2019-2-py3
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-2019.2-py3:debian-10
|
||||||
|
- name: debian-9-2019-2-py3
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-2019.2-py3:debian-9
|
||||||
|
- name: ubuntu-1804-2019-2-py3
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-2019.2-py3:ubuntu-18.04
|
||||||
|
- name: ubuntu-1604-2019-2-py3
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-2019.2-py3:ubuntu-16.04
|
||||||
|
- name: centos-8-2019-2-py3
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-2019.2-py3:centos-8
|
||||||
|
- name: centos-7-2019-2-py3
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-2019.2-py3:centos-7
|
||||||
|
- name: fedora-31-2019-2-py3
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-2019.2-py3:fedora-31
|
||||||
|
- name: opensuse-leap-152-2019-2-py3
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-2019.2-py3:opensuse-leap-15.2
|
||||||
|
run_command: /usr/lib/systemd/systemd
|
||||||
|
# Workaround to avoid intermittent failures on `opensuse-leap-15.2`:
|
||||||
|
# => SCP did not finish successfully (255): (Net::SCP::Error)
|
||||||
|
transport:
|
||||||
|
max_ssh_sessions: 1
|
||||||
|
- name: amazonlinux-2-2019-2-py3
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-2019.2-py3:amazonlinux-2
|
||||||
|
- name: centos-6-2019-2-py2
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-2019.2-py2:centos-6
|
||||||
|
run_command: /sbin/init
|
||||||
|
- name: amazonlinux-1-2019-2-py2
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-2019.2-py2:amazonlinux-1
|
||||||
|
run_command: /sbin/init
|
||||||
|
- name: arch-base-latest-2019-2-py2
|
||||||
|
driver:
|
||||||
|
image: saltimages/salt-2019.2-py2:arch-base-latest
|
||||||
|
run_command: /usr/lib/systemd/systemd
|
||||||
|
|
||||||
|
provisioner:
|
||||||
|
name: salt_solo
|
||||||
|
log_level: debug
|
||||||
|
salt_install: none
|
||||||
|
require_chef: false
|
||||||
|
formula: postgres
|
||||||
|
salt_copy_filter:
|
||||||
|
- .kitchen
|
||||||
|
- .git
|
||||||
|
|
||||||
|
verifier:
|
||||||
|
# https://www.inspec.io/
|
||||||
|
name: inspec
|
||||||
|
sudo: true
|
||||||
|
# cli, documentation, html, progress, json, json-min, json-rspec, junit
|
||||||
|
reporter:
|
||||||
|
- cli
|
||||||
|
|
||||||
|
suites:
|
||||||
|
- name: default
|
||||||
|
provisioner:
|
||||||
|
state_top:
|
||||||
|
base:
|
||||||
|
'*':
|
||||||
|
- postgres
|
||||||
|
pillars:
|
||||||
|
top.sls:
|
||||||
|
base:
|
||||||
|
'*':
|
||||||
|
- postgres
|
||||||
|
pillars_from_files:
|
||||||
|
postgres.sls: test/salt/pillar/postgres.sls
|
||||||
|
verifier:
|
||||||
|
inspec_tests:
|
||||||
|
- path: test/integration/default
|
||||||
@@ -1,18 +1,21 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=yaml
|
||||||
|
---
|
||||||
# Port to use for the cluster -- can be used to provide a non-standard port
|
# Port to use for the cluster -- can be used to provide a non-standard port
|
||||||
# NOTE: If already set in the minion config, that value takes priority
|
# NOTE: If already set in the minion config, that value takes priority
|
||||||
postgres.port: '5432'
|
postgres.port: '5432'
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
# UPSTREAM REPO
|
# UPSTREAM REPO
|
||||||
# Set True to configure upstream postgresql.org repository for YUM/APT/ZYPP
|
# Set true to configure upstream postgresql.org repository for YUM/APT/ZYPP
|
||||||
use_upstream_repo: False
|
use_upstream_repo: false
|
||||||
# Version to install from upstream repository (if upstream_repo: True)
|
# Version to install from upstream repository (if upstream_repo: true)
|
||||||
version: '10'
|
version: '10'
|
||||||
# Set True to add a file in /etc/profile.d adding the bin dir in $PATH
|
# Set true to add a file in /etc/profile.d adding the bin dir in $PATH
|
||||||
# as packages from upstream put them somewhere like /usr/pgsql-10/bin
|
# as packages from upstream put them somewhere like /usr/pgsql-10/bin
|
||||||
add_profile: False
|
add_profile: false
|
||||||
# If automatic package installation fails, use `fromrepo` to specify the
|
# If automatic package installation fails, use `fromrepo` to specify the
|
||||||
# upstream repo to install packages from [#133, #185] (if upstream_repo: True)
|
# upstream repo to install packages from [#133, #185] (if upstream_repo: true)
|
||||||
fromrepo: 'jessie-pgdg'
|
fromrepo: 'jessie-pgdg'
|
||||||
|
|
||||||
### MACOS
|
### MACOS
|
||||||
@@ -24,16 +27,21 @@ postgres:
|
|||||||
# These pillars are typically never required.
|
# These pillars are typically never required.
|
||||||
# pkg: 'postgresql'
|
# pkg: 'postgresql'
|
||||||
# pkg_client: 'postgresql-client'
|
# pkg_client: 'postgresql-client'
|
||||||
# service: postgresql
|
# service:
|
||||||
|
# name: 'postgresql'
|
||||||
|
# flags: -w -s -m fast
|
||||||
|
# sysrc: true
|
||||||
pkgs_extra:
|
pkgs_extra:
|
||||||
|
{%- if grains.os_family not in ('FreeBSD',) %}
|
||||||
- postgresql-contrib
|
- postgresql-contrib
|
||||||
|
{%- endif %}
|
||||||
- postgresql-plpython
|
- postgresql-plpython
|
||||||
|
|
||||||
# CLUSTER
|
# CLUSTER
|
||||||
# The default `encoding` is derived from the `locale` so not recommended
|
# The default `encoding` is derived from the `locale` so not recommended
|
||||||
# to provide a value for it unless necessary
|
# to provide a value for it unless necessary
|
||||||
cluster:
|
cluster:
|
||||||
locale: en_GB.UTF-8
|
locale: en_US.UTF-8
|
||||||
# encoding: UTF8
|
# encoding: UTF8
|
||||||
|
|
||||||
# 'Alternatives system' priority incremental. 0 disables feature.
|
# 'Alternatives system' priority incremental. 0 disables feature.
|
||||||
@@ -80,19 +88,19 @@ postgres:
|
|||||||
- ['users_as_appuser', 'jsmith', 'connuser']
|
- ['users_as_appuser', 'jsmith', 'connuser']
|
||||||
|
|
||||||
# Backup extension for configuration files, defaults to ``.bak``.
|
# Backup extension for configuration files, defaults to ``.bak``.
|
||||||
# Set ``False`` to stop creation of backups when config files change.
|
# Set ``false`` to stop creation of backups when config files change.
|
||||||
{%- if salt['status.time']|default(none) is callable %}
|
{%- if salt['status.time']|default(none) is callable %}
|
||||||
config_backup: ".backup@{{ salt['status.time']('%y-%m-%d_%H:%M:%S') }}"
|
config_backup: ".backup@{{ salt['status.time']('%y-%m-%d_%H:%M:%S') }}"
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
{%- if grains['init'] == 'unknown' %}
|
{%- if 'init' in grains and grains['init'] == 'unknown' %}
|
||||||
|
|
||||||
# If Salt is unable to detect init system running in the scope of state run,
|
# If Salt is unable to detect init system running in the scope of state run,
|
||||||
# probably we are trying to bake a container/VM image with PostgreSQL.
|
# probably we are trying to bake a container/VM image with PostgreSQL.
|
||||||
# Use ``bake_image`` setting to control how PostgreSQL will be started: if set
|
# Use ``bake_image`` setting to control how PostgreSQL will be started: if set
|
||||||
# to ``True`` the raw ``pg_ctl`` will be utilized instead of packaged init
|
# to ``true`` the raw ``pg_ctl`` will be utilized instead of packaged init
|
||||||
# script, job or unit run with Salt ``service`` state.
|
# script, job or unit run with Salt ``service`` state.
|
||||||
bake_image: True
|
bake_image: true
|
||||||
|
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
@@ -128,18 +136,18 @@ postgres:
|
|||||||
localUser:
|
localUser:
|
||||||
ensure: present
|
ensure: present
|
||||||
password: '98ruj923h4rf'
|
password: '98ruj923h4rf'
|
||||||
createdb: False
|
createdb: false
|
||||||
createroles: False
|
createroles: false
|
||||||
inherit: True
|
inherit: true
|
||||||
replication: False
|
replication: false
|
||||||
|
|
||||||
remoteUser:
|
remoteUser:
|
||||||
ensure: present
|
ensure: present
|
||||||
password: '98ruj923h4rf'
|
password: '98ruj923h4rf'
|
||||||
createdb: False
|
createdb: false
|
||||||
createroles: False
|
createroles: false
|
||||||
inherit: True
|
inherit: true
|
||||||
replication: False
|
replication: false
|
||||||
|
|
||||||
absentUser:
|
absentUser:
|
||||||
ensure: absent
|
ensure: absent
|
||||||
@@ -180,14 +188,14 @@ postgres:
|
|||||||
|
|
||||||
# optional extensions to install in schema
|
# optional extensions to install in schema
|
||||||
extensions:
|
extensions:
|
||||||
|
# postgis: {}
|
||||||
uuid-ossp:
|
uuid-ossp:
|
||||||
schema: uuid-ossp
|
schema: uuid-ossp
|
||||||
maintenance_db: db1
|
maintenance_db: db1
|
||||||
#postgis: {}
|
|
||||||
|
|
||||||
remove:
|
remove:
|
||||||
data: True
|
data: true
|
||||||
multiple_releases: True
|
multiple_releases: true
|
||||||
releases: ['9.6', '10',]
|
releases: ['9.6', '10']
|
||||||
|
|
||||||
# vim: ft=yaml ts=2 sts=2 sw=2 et
|
# vim: ft=yaml ts=2 sts=2 sw=2 et
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=yaml
|
||||||
|
---
|
||||||
### Set parameters based on PostgreSQL version supplied with particular distro
|
### Set parameters based on PostgreSQL version supplied with particular distro
|
||||||
|
|
||||||
{% import_yaml "postgres/repo.yaml" as repo %}
|
{% import_yaml "postgres/repo.yaml" as repo %}
|
||||||
@@ -32,6 +35,7 @@
|
|||||||
prepare_cluster:
|
prepare_cluster:
|
||||||
pgcommand: pg_createcluster {{ version }} {{ cluster_name }} -d
|
pgcommand: pg_createcluster {{ version }} {{ cluster_name }} -d
|
||||||
user: root
|
user: root
|
||||||
|
bake_image_run_cmd: pg_ctlcluster {{ version }} {{ cluster_name }} start
|
||||||
|
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
@@ -50,27 +54,32 @@
|
|||||||
|
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
## Debian GNU/Linux
|
## Debian GNU/Linux (the second parameter refers to the postgresql package version, not the distro)
|
||||||
{{ debian_codename('wheezy', '9.1') }}
|
# http://apt.postgresql.org/pub/repos/apt/dists/
|
||||||
|
# https://packages.debian.org/search?keywords=postgresql&searchon=names
|
||||||
{{ debian_codename('jessie', '9.4') }}
|
{{ debian_codename('jessie', '9.4') }}
|
||||||
{{ debian_codename('stretch', '9.6') }}
|
{{ debian_codename('stretch', '9.6') }}
|
||||||
|
{{ debian_codename('buster', '11') }}
|
||||||
|
|
||||||
# `oscodename` grain has long distro name
|
# `oscodename` grain has long distro name
|
||||||
# if `lsb-release` package not installed
|
# if `lsb-release` package not installed
|
||||||
{{ debian_codename('wheezy', '9.1', 'Debian GNU/Linux 7 (wheezy)') }}
|
|
||||||
{{ debian_codename('jessie', '9.4', 'Debian GNU/Linux 8 (jessie)') }}
|
{{ debian_codename('jessie', '9.4', 'Debian GNU/Linux 8 (jessie)') }}
|
||||||
{{ debian_codename('stretch', '9.6', 'Debian GNU/Linux 9 (stretch)') }}
|
{{ debian_codename('stretch', '9.6', 'Debian GNU/Linux 9 (stretch)') }}
|
||||||
|
{{ debian_codename('buster', '11', 'Debian GNU/Linux 10 (buster)') }}
|
||||||
|
|
||||||
## Ubuntu
|
## Ubuntu
|
||||||
{{ debian_codename('trusty', '9.3') }}
|
# http://apt.postgresql.org/pub/repos/apt/dists/
|
||||||
|
# https://packages.ubuntu.com/search?keywords=postgresql&searchon=names
|
||||||
{{ debian_codename('xenial', '9.5') }}
|
{{ debian_codename('xenial', '9.5') }}
|
||||||
{{ debian_codename('artful', '9.6') }}
|
|
||||||
{{ debian_codename('bionic', '10') }}
|
{{ debian_codename('bionic', '10') }}
|
||||||
{{ debian_codename('cosmic', '10') }}
|
{{ debian_codename('eoan', '11') }}
|
||||||
|
{{ debian_codename('focal', '12') }}
|
||||||
|
|
||||||
## Fedora
|
## Fedora
|
||||||
|
# http://apt.postgresql.org/pub/repos/yum/reporpms/
|
||||||
|
# https://apps.fedoraproject.org/packages/postgresql
|
||||||
# `oscodename` grain has long distro name
|
# `oscodename` grain has long distro name
|
||||||
{{ fedora_codename('Fedora-27', '9.6', 'Fedora 27 (Twenty Seven)') }}
|
{{ fedora_codename('Fedora-31', '11', 'Fedora 31 (Thirty One)') }}
|
||||||
{{ fedora_codename('Fedora-26', '9.6', 'Fedora 26 (Twenty Six)') }}
|
{{ fedora_codename('Fedora-30', '11', 'Fedora 30 (Thirty)') }}
|
||||||
|
|
||||||
# vim: ft=sls
|
# vim: ft=sls
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=yaml
|
||||||
|
---
|
||||||
# Default lookup dictionary
|
# Default lookup dictionary
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
use_upstream_repo: True
|
use_upstream_repo: true
|
||||||
add_profile: False # add bin_dir to $PATH, if installed from repos
|
add_profile: false # add bin_dir to $PATH, if installed from repos
|
||||||
version: '10'
|
version: '11'
|
||||||
pkg: postgresql
|
pkg: postgresql
|
||||||
pkgs_extra: []
|
pkgs_extra: []
|
||||||
|
pkgs_deps: []
|
||||||
pkg_client: postgresql-client
|
pkg_client: postgresql-client
|
||||||
pkg_dev: postgresql-devel
|
pkg_dev: postgresql-devel
|
||||||
pkg_dev_deps: []
|
pkg_dev_deps: []
|
||||||
@@ -17,7 +21,7 @@ postgres:
|
|||||||
group: postgres
|
group: postgres
|
||||||
|
|
||||||
prepare_cluster:
|
prepare_cluster:
|
||||||
run: True
|
run: true
|
||||||
pgcommand: initdb -D
|
pgcommand: initdb -D
|
||||||
pgtestfile: PG_VERSION
|
pgtestfile: PG_VERSION
|
||||||
user: postgres
|
user: postgres
|
||||||
@@ -38,6 +42,7 @@ postgres:
|
|||||||
tmpdir: /tmp/postgrestmp
|
tmpdir: /tmp/postgrestmp
|
||||||
postgresapp:
|
postgresapp:
|
||||||
# See: https://github.com/PostgresApp/PostgresApp/releases/
|
# See: https://github.com/PostgresApp/PostgresApp/releases/
|
||||||
|
# yamllint disable-line rule:line-length
|
||||||
url: https://github.com/PostgresApp/PostgresApp/releases/download/v2.1.1/Postgres-2.1.1.dmg
|
url: https://github.com/PostgresApp/PostgresApp/releases/download/v2.1.1/Postgres-2.1.1.dmg
|
||||||
sum: sha256=ac0656b522a58fd337931313f09509c09610c4a6078fe0b8e469e69af1e1750b
|
sum: sha256=ac0656b522a58fd337931313f09509c09610c4a6078fe0b8e469e69af1e1750b
|
||||||
homebrew:
|
homebrew:
|
||||||
@@ -67,9 +72,12 @@ postgres:
|
|||||||
|
|
||||||
config_backup: '.bak'
|
config_backup: '.bak'
|
||||||
|
|
||||||
service: postgresql
|
service:
|
||||||
|
name: postgresql
|
||||||
|
sysrc: false
|
||||||
|
|
||||||
bake_image: False
|
bake_image: false
|
||||||
|
bake_image_run_cmd: pg_ctl start
|
||||||
|
|
||||||
fromrepo: ''
|
fromrepo: ''
|
||||||
|
|
||||||
@@ -84,6 +92,6 @@ postgres:
|
|||||||
altpriority: 0
|
altpriority: 0
|
||||||
|
|
||||||
remove:
|
remove:
|
||||||
data: False
|
data: false
|
||||||
multiple_releases: False
|
multiple_releases: false
|
||||||
releases: ['9.2', '9.3', '9.4', '9.5', '9.6', '10',]
|
releases: ['9.2', '9.3', '9.4', '9.5', '9.6', '10']
|
||||||
|
|||||||
115
postgres/libtofs.jinja
Normal file
115
postgres/libtofs.jinja
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
{%- macro files_switch(
|
||||||
|
source_files,
|
||||||
|
lookup=None,
|
||||||
|
default_files_switch=["id", "os_family"],
|
||||||
|
indent_width=6,
|
||||||
|
use_subpath=False
|
||||||
|
) %}
|
||||||
|
{#-
|
||||||
|
Returns a valid value for the "source" parameter of a "file.managed"
|
||||||
|
state function. This makes easier the usage of the Template Override and
|
||||||
|
Files Switch (TOFS) pattern.
|
||||||
|
Params:
|
||||||
|
* source_files: ordered list of files to look for
|
||||||
|
* lookup: key under "<tplroot>:tofs:source_files" to prepend to the
|
||||||
|
list of source files
|
||||||
|
* default_files_switch: if there's no config (e.g. pillar)
|
||||||
|
"<tplroot>:tofs:files_switch" this is the ordered list of grains to
|
||||||
|
use as selector switch of the directories under
|
||||||
|
"<path_prefix>/files"
|
||||||
|
* indent_width: indentation of the result value to conform to YAML
|
||||||
|
* use_subpath: defaults to `False` but if set, lookup the source file
|
||||||
|
recursively from the current state directory up to `tplroot`
|
||||||
|
Example (based on a `tplroot` of `xxx`):
|
||||||
|
If we have a state:
|
||||||
|
Deploy configuration:
|
||||||
|
file.managed:
|
||||||
|
- name: /etc/yyy/zzz.conf
|
||||||
|
- source: {{ files_switch(
|
||||||
|
["/etc/yyy/zzz.conf", "/etc/yyy/zzz.conf.jinja"],
|
||||||
|
lookup="Deploy configuration",
|
||||||
|
) }}
|
||||||
|
- template: jinja
|
||||||
|
In a minion with id=theminion and os_family=RedHat, it's going to be
|
||||||
|
rendered as:
|
||||||
|
Deploy configuration:
|
||||||
|
file.managed:
|
||||||
|
- name: /etc/yyy/zzz.conf
|
||||||
|
- source:
|
||||||
|
- salt://xxx/files/theminion/etc/yyy/zzz.conf
|
||||||
|
- salt://xxx/files/theminion/etc/yyy/zzz.conf.jinja
|
||||||
|
- salt://xxx/files/RedHat/etc/yyy/zzz.conf
|
||||||
|
- salt://xxx/files/RedHat/etc/yyy/zzz.conf.jinja
|
||||||
|
- salt://xxx/files/default/etc/yyy/zzz.conf
|
||||||
|
- salt://xxx/files/default/etc/yyy/zzz.conf.jinja
|
||||||
|
- template: jinja
|
||||||
|
#}
|
||||||
|
{#- Get the `tplroot` from `tpldir` #}
|
||||||
|
{%- set tplroot = tpldir.split("/")[0] %}
|
||||||
|
{%- set path_prefix = salt["config.get"](tplroot ~ ":tofs:path_prefix", tplroot) %}
|
||||||
|
{%- set files_dir = salt["config.get"](tplroot ~ ":tofs:dirs:files", "files") %}
|
||||||
|
{%- set files_switch_list = salt["config.get"](
|
||||||
|
tplroot ~ ":tofs:files_switch", default_files_switch
|
||||||
|
) %}
|
||||||
|
{#- Lookup source_files (v2), files (v1), or fallback to an empty list #}
|
||||||
|
{%- set src_files = salt["config.get"](
|
||||||
|
tplroot ~ ":tofs:source_files:" ~ lookup,
|
||||||
|
salt["config.get"](tplroot ~ ":tofs:files:" ~ lookup, []),
|
||||||
|
) %}
|
||||||
|
{#- Append the default source_files #}
|
||||||
|
{%- set src_files = src_files + source_files %}
|
||||||
|
{#- Only add to [""] when supporting older TOFS implementations #}
|
||||||
|
{%- set path_prefix_exts = [""] %}
|
||||||
|
{%- if use_subpath and tplroot != tpldir %}
|
||||||
|
{#- Walk directory tree to find {{ files_dir }} #}
|
||||||
|
{%- set subpath_parts = tpldir.lstrip(tplroot).lstrip("/").split("/") %}
|
||||||
|
{%- for path in subpath_parts %}
|
||||||
|
{%- set subpath = subpath_parts[0 : loop.index] | join("/") %}
|
||||||
|
{%- do path_prefix_exts.append("/" ~ subpath) %}
|
||||||
|
{%- endfor %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- for path_prefix_ext in path_prefix_exts | reverse %}
|
||||||
|
{%- set path_prefix_inc_ext = path_prefix ~ path_prefix_ext %}
|
||||||
|
{#- For older TOFS implementation, use `files_switch` from the config #}
|
||||||
|
{#- Use the default, new method otherwise #}
|
||||||
|
{%- set fsl = salt["config.get"](
|
||||||
|
tplroot ~ path_prefix_ext | replace("/", ":") ~ ":files_switch",
|
||||||
|
files_switch_list,
|
||||||
|
) %}
|
||||||
|
{#- Append an empty value to evaluate as `default` in the loop below #}
|
||||||
|
{%- if "" not in fsl %}
|
||||||
|
{%- set fsl = fsl + [""] %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- for fs in fsl %}
|
||||||
|
{%- for src_file in src_files %}
|
||||||
|
{%- if fs %}
|
||||||
|
{%- set fs_dirs = salt["config.get"](fs, fs) %}
|
||||||
|
{%- else %}
|
||||||
|
{%- set fs_dirs = salt["config.get"](
|
||||||
|
tplroot ~ ":tofs:dirs:default", "default"
|
||||||
|
) %}
|
||||||
|
{%- endif %}
|
||||||
|
{#- Force the `config.get` lookup result as a list where necessary #}
|
||||||
|
{#- since we need to also handle grains that are lists #}
|
||||||
|
{%- if fs_dirs is string %}
|
||||||
|
{%- set fs_dirs = [fs_dirs] %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- for fs_dir in fs_dirs %}
|
||||||
|
{#- strip empty elements by using a select #}
|
||||||
|
{%- set url = (
|
||||||
|
[
|
||||||
|
"- salt:/",
|
||||||
|
path_prefix_inc_ext.strip("/"),
|
||||||
|
files_dir.strip("/"),
|
||||||
|
fs_dir.strip("/"),
|
||||||
|
src_file.strip("/"),
|
||||||
|
]
|
||||||
|
| select
|
||||||
|
| join("/")
|
||||||
|
) %}
|
||||||
|
{{ url | indent(indent_width, true) }}
|
||||||
|
{%- endfor %}
|
||||||
|
{%- endfor %}
|
||||||
|
{%- endfor %}
|
||||||
|
{%- endfor %}
|
||||||
|
{%- endmacro %}
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
{%- filter indent(4) %}
|
{%- filter indent(4) %}
|
||||||
{%- for k, v in kwarg|dictsort() %}
|
{%- for k, v in kwarg|dictsort() %}
|
||||||
- {{ k }}: {{ v }}
|
- {{ k }}: {{ v|yaml_dquote if v is string else v }}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
{%- endfilter %}
|
{%- endfilter %}
|
||||||
|
|
||||||
@@ -18,7 +18,8 @@
|
|||||||
{%- if 'ensure' in kwarg %}
|
{%- if 'ensure' in kwarg %}
|
||||||
{%- set ensure = kwarg.pop('ensure') %}
|
{%- set ensure = kwarg.pop('ensure') %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if 'user' not in kwarg and state != 'postgres_schema' %}
|
{%- set user_available = not (state == 'postgres_schema' and grains.saltversioninfo < [2018, 3]) %}
|
||||||
|
{%- if 'user' not in kwarg and user_available %}
|
||||||
{%- do kwarg.update({'user': postgres.user}) %}
|
{%- do kwarg.update({'user': postgres.user}) %}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,19 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=yaml
|
||||||
|
---
|
||||||
{% import_yaml "postgres/repo.yaml" as repo %}
|
{% import_yaml "postgres/repo.yaml" as repo %}
|
||||||
|
|
||||||
{% set release = repo.version|replace('.', '') %}
|
{% set release = repo.version|replace('.', '') %}
|
||||||
|
|
||||||
Arch:
|
Arch:
|
||||||
|
use_upstream_repo: false
|
||||||
conf_dir: /var/lib/postgres/data
|
conf_dir: /var/lib/postgres/data
|
||||||
data_dir: /var/lib/postgres/data
|
data_dir: /var/lib/postgres/data
|
||||||
pkg_client: postgresql-libs
|
pkg_client: postgresql-libs
|
||||||
pkg_dev: postgresql
|
pkg_dev: postgresql
|
||||||
|
|
||||||
Debian:
|
Debian:
|
||||||
|
pkgs_deps: ['python3-apt']
|
||||||
pkg_repo:
|
pkg_repo:
|
||||||
humanname: PostgreSQL Official Repository
|
humanname: PostgreSQL Official Repository
|
||||||
key_url: 'https://www.postgresql.org/media/keys/ACCC4CF8.asc'
|
key_url: 'https://www.postgresql.org/media/keys/ACCC4CF8.asc'
|
||||||
@@ -21,20 +26,34 @@ Debian:
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
FreeBSD:
|
FreeBSD:
|
||||||
conf_dir: /usr/local/pgsql/data
|
{% if repo.version|float >= 9.6 %}
|
||||||
data_dir: /usr/local/pgsql/data
|
user: &freebsd-user postgres
|
||||||
|
group: &freebsd-group postgres
|
||||||
|
conf_dir: {{ '/var/db/postgres/data' ~ release }}
|
||||||
|
data_dir: {{ '/var/db/postgres/data' ~ release }}
|
||||||
|
{% else %}
|
||||||
user: &freebsd-user pgsql
|
user: &freebsd-user pgsql
|
||||||
group: &freebsd-group pgsql
|
group: &freebsd-group pgsql
|
||||||
|
conf_dir: /usr/local/pgsql/data
|
||||||
|
data_dir: /usr/local/pgsql/data
|
||||||
|
{% endif %}
|
||||||
|
pkg_libpq_dev: null #not in freebsd
|
||||||
pkg_client: postgresql{{ release }}-client
|
pkg_client: postgresql{{ release }}-client
|
||||||
pkg: postgresql{{ release }}-server
|
pkg: postgresql{{ release }}-server
|
||||||
prepare_cluster:
|
prepare_cluster:
|
||||||
user: *freebsd-user
|
user: *freebsd-user
|
||||||
group: *freebsd-group
|
group: *freebsd-group
|
||||||
|
service:
|
||||||
|
flags: -w -s -m fast
|
||||||
|
sysrc: True
|
||||||
|
|
||||||
OpenBSD:
|
OpenBSD:
|
||||||
conf_dir: /var/postgresql/data
|
conf_dir: /var/postgresql/data
|
||||||
data_dir: /var/postgresql/data
|
data_dir: /var/postgresql/data
|
||||||
user: _postgresql
|
user: _postgresql
|
||||||
|
service:
|
||||||
|
flags: -w -s -m fast
|
||||||
|
sysrc: True
|
||||||
|
|
||||||
RedHat:
|
RedHat:
|
||||||
pkg_repo:
|
pkg_repo:
|
||||||
@@ -44,6 +63,10 @@ RedHat:
|
|||||||
gpgkey: 'https://download.postgresql.org/pub/repos/yum/RPM-GPG-KEY-PGDG-{{ release }}'
|
gpgkey: 'https://download.postgresql.org/pub/repos/yum/RPM-GPG-KEY-PGDG-{{ release }}'
|
||||||
baseurl: 'https://download.postgresql.org/pub/repos/yum/{{ repo.version }}/redhat/rhel-$releasever-$basearch'
|
baseurl: 'https://download.postgresql.org/pub/repos/yum/{{ repo.version }}/redhat/rhel-$releasever-$basearch'
|
||||||
|
|
||||||
|
{%- if grains.get('osmajorrelease', 0) >= 7 %}
|
||||||
|
pkg_python: python3-psycopg2
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
{% if repo.use_upstream_repo == true %}
|
{% if repo.use_upstream_repo == true %}
|
||||||
{% set data_dir = '/var/lib/pgsql/' ~ repo.version ~ '/data' %}
|
{% set data_dir = '/var/lib/pgsql/' ~ repo.version ~ '/data' %}
|
||||||
|
|
||||||
@@ -54,7 +77,8 @@ RedHat:
|
|||||||
pkg_dev: postgresql{{ release }}-devel
|
pkg_dev: postgresql{{ release }}-devel
|
||||||
conf_dir: {{ data_dir }}
|
conf_dir: {{ data_dir }}
|
||||||
data_dir: {{ data_dir }}
|
data_dir: {{ data_dir }}
|
||||||
service: postgresql-{{ repo.version }}
|
service:
|
||||||
|
name: postgresql-{{ repo.version }}
|
||||||
|
|
||||||
# Alternatives system
|
# Alternatives system
|
||||||
linux:
|
linux:
|
||||||
@@ -116,9 +140,9 @@ Suse:
|
|||||||
pkg_repo:
|
pkg_repo:
|
||||||
name: pgdg-sles-{{ release }}
|
name: pgdg-sles-{{ release }}
|
||||||
humanname: PostgreSQL {{ repo.version }} $releasever - $basearch
|
humanname: PostgreSQL {{ repo.version }} $releasever - $basearch
|
||||||
#Using sles-12 upstream repo for opensuse
|
# works for postgres 11 onwards
|
||||||
baseurl: 'https://download.postgresql.org/pub/repos/zypp/{{ repo.version }}/suse/sles-12-$basearch'
|
baseurl: 'https://download.postgresql.org/pub/repos/zypp/{{ repo.version }}/suse/sles-$releasever-$basearch'
|
||||||
key_url: 'https://download.postgresql.org/pub/repos/zypp/{{ repo.version }}/suse/sles-12-$basearch/repodata/repomd.xml.key'
|
key_url: 'https://download.postgresql.org/pub/repos/zypp/{{ repo.version }}/suse/sles-$releasever-$basearch/repodata/repomd.xml.key'
|
||||||
gpgcheck: 1
|
gpgcheck: 1
|
||||||
gpgautoimport: True
|
gpgautoimport: True
|
||||||
|
|
||||||
@@ -132,7 +156,8 @@ Suse:
|
|||||||
pkg_libs: postgresql{{ release }}-libs
|
pkg_libs: postgresql{{ release }}-libs
|
||||||
conf_dir: {{ data_dir }}
|
conf_dir: {{ data_dir }}
|
||||||
data_dir: {{ data_dir }}
|
data_dir: {{ data_dir }}
|
||||||
service: postgresql-{{ repo.version }}
|
service:
|
||||||
|
name: postgresql-{{ repo.version }}
|
||||||
|
|
||||||
# Alternatives system
|
# Alternatives system
|
||||||
linux:
|
linux:
|
||||||
@@ -175,9 +200,11 @@ Suse:
|
|||||||
## jinja check avoids rendering noise/failure on Linux
|
## jinja check avoids rendering noise/failure on Linux
|
||||||
MacOS:
|
MacOS:
|
||||||
{%- if repo.use_upstream_repo == 'homebrew' %}
|
{%- if repo.use_upstream_repo == 'homebrew' %}
|
||||||
service: homebrew.mxcl.postgresql
|
service:
|
||||||
|
name: homebrew.mxcl.postgresql
|
||||||
{%- elif repo.use_upstream_repo == 'postgresapp' %}
|
{%- elif repo.use_upstream_repo == 'postgresapp' %}
|
||||||
service: com.postgresapp.Postgres2
|
service:
|
||||||
|
name: com.postgresapp.Postgres2
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
pkg: postgresql
|
pkg: postgresql
|
||||||
pkg_client:
|
pkg_client:
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=yaml
|
||||||
|
---
|
||||||
{% import_yaml "postgres/repo.yaml" as repo %}
|
{% import_yaml "postgres/repo.yaml" as repo %}
|
||||||
|
|
||||||
Fedora:
|
Fedora:
|
||||||
pkg_repo:
|
pkg_repo:
|
||||||
|
# yamllint disable-line rule:line-length
|
||||||
baseurl: 'https://download.postgresql.org/pub/repos/yum/{{ repo.version }}/fedora/fedora-$releasever-$basearch'
|
baseurl: 'https://download.postgresql.org/pub/repos/yum/{{ repo.version }}/fedora/fedora-$releasever-$basearch'
|
||||||
remove:
|
remove:
|
||||||
releases: ['9.4', '9.5', '9.6', '10',]
|
releases: ['9.4', '9.5', '9.6', '10']
|
||||||
|
|
||||||
# vim: ft=sls
|
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=yaml
|
||||||
|
---
|
||||||
# This file allows to get PostgreSQL version and upstream repo settings
|
# This file allows to get PostgreSQL version and upstream repo settings
|
||||||
# early from Pillar to set correct lookup dictionaty items
|
# early from Pillar to set correct lookup dictionaty items
|
||||||
|
|
||||||
|
|||||||
@@ -5,41 +5,37 @@
|
|||||||
|
|
||||||
{%- if postgres.bake_image %}
|
{%- if postgres.bake_image %}
|
||||||
|
|
||||||
include:
|
|
||||||
- postgres.server
|
|
||||||
|
|
||||||
# An attempt to start PostgreSQL with `pg_ctl`
|
# An attempt to start PostgreSQL with `pg_ctl`
|
||||||
|
postgresql-running:
|
||||||
postgresql-start:
|
|
||||||
cmd.run:
|
cmd.run:
|
||||||
- name: pg_ctl -D {{ postgres.data_dir }} -l logfile start
|
- name: {{ postgres.bake_image_run_cmd }}
|
||||||
- runas: {{ postgres.user }}
|
- runas: {{ postgres.user }}
|
||||||
- unless:
|
- unless:
|
||||||
- ps -p $(head -n 1 {{ postgres.data_dir }}/postmaster.pid) 2>/dev/null
|
- ps -p $(head -n 1 {{ postgres.data_dir }}/postmaster.pid) 2>/dev/null
|
||||||
- require:
|
- require:
|
||||||
- file: postgresql-pg_hba
|
- file: postgresql-pg_hba
|
||||||
|
|
||||||
|
postgresql-service-reload:
|
||||||
|
module.run:
|
||||||
|
- name: test.true
|
||||||
|
- require:
|
||||||
|
- cmd: postgresql-running
|
||||||
|
|
||||||
# Try to enable PostgreSQL in "manual" way
|
# Try to enable PostgreSQL in "manual" way
|
||||||
|
|
||||||
postgresql-enable:
|
postgresql-enable:
|
||||||
cmd.run:
|
cmd.run:
|
||||||
{%- if salt['file.file_exists']('/bin/systemctl') %}
|
{%- if salt['file.file_exists']('/bin/systemctl') %}
|
||||||
- name: systemctl enable {{ postgres.service }}
|
- name: systemctl enable {{ postgres.service.name }}
|
||||||
{%- elif salt['cmd.which']('chkconfig') %}
|
{%- elif salt['cmd.which']('chkconfig') %}
|
||||||
- name: chkconfig {{ postgres.service }} on
|
- name: chkconfig {{ postgres.service.name }} on
|
||||||
{%- elif salt['file.file_exists']('/usr/sbin/update-rc.d') %}
|
{%- elif salt['file.file_exists']('/usr/sbin/update-rc.d') %}
|
||||||
- name: update-rc.d {{ service }} defaults
|
- name: update-rc.d {{ postgres.service.name }} defaults
|
||||||
{%- else %}
|
{%- else %}
|
||||||
# Nothing to do
|
# Nothing to do
|
||||||
- name: 'true'
|
- name: 'true'
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
- require:
|
- require:
|
||||||
- cmd: postgresql-start
|
- cmd: postgresql-running
|
||||||
|
|
||||||
{%- else %}
|
|
||||||
|
|
||||||
postgresql-start:
|
|
||||||
test.show_notification:
|
|
||||||
- text: The 'postgres:bake_image' Pillar is disabled (set to 'False').
|
|
||||||
|
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|||||||
@@ -20,8 +20,6 @@ postgresql-server:
|
|||||||
- pkgs: {{ pkgs | json }}
|
- pkgs: {{ pkgs | json }}
|
||||||
{%- if postgres.use_upstream_repo == true %}
|
{%- if postgres.use_upstream_repo == true %}
|
||||||
- refresh: True
|
- refresh: True
|
||||||
- require:
|
|
||||||
- pkgrepo: postgresql-repo
|
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if postgres.fromrepo %}
|
{%- if postgres.fromrepo %}
|
||||||
- fromrepo: {{ postgres.fromrepo }}
|
- fromrepo: {{ postgres.fromrepo }}
|
||||||
@@ -31,8 +29,8 @@ postgresql-server:
|
|||||||
- require_in:
|
- require_in:
|
||||||
- file: postgresql-server
|
- file: postgresql-server
|
||||||
file.managed:
|
file.managed:
|
||||||
- name: /Library/LaunchAgents/{{ postgres.service }}.plist
|
- name: /Library/LaunchAgents/{{ postgres.service.name }}.plist
|
||||||
- source: /usr/local/opt/postgres/{{ postgres.service }}.plist
|
- source: /usr/local/opt/postgres/{{ postgres.service.name }}.plist
|
||||||
- group: wheel
|
- group: wheel
|
||||||
- require_in:
|
- require_in:
|
||||||
- service: postgresql-running
|
- service: postgresql-running
|
||||||
@@ -261,12 +259,23 @@ postgresql-tablespace-dir-{{ name }}-fcontext:
|
|||||||
|
|
||||||
{%- if not postgres.bake_image %}
|
{%- if not postgres.bake_image %}
|
||||||
|
|
||||||
|
# Workaround for FreeBSD minion undefinitely hanging on service start
|
||||||
|
# cf. https://github.com/saltstack/salt/issues/44848
|
||||||
|
{% if postgres.service.sysrc %}
|
||||||
|
posgresql-rc-flags:
|
||||||
|
sysrc.managed:
|
||||||
|
- name: {{ postgres.service.name }}_flags
|
||||||
|
- value: "{{ postgres.service.flags }} > /dev/null 2>&1"
|
||||||
|
- watch_in:
|
||||||
|
- service: postgresql-running
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
# Start PostgreSQL server using OS init
|
# Start PostgreSQL server using OS init
|
||||||
# Note: This is also the target for numerous `watch_in` requisites above, used
|
# Note: This is also the target for numerous `watch_in` requisites above, used
|
||||||
# for the necessary service restart after changing the relevant configuration files
|
# for the necessary service restart after changing the relevant configuration files
|
||||||
postgresql-running:
|
postgresql-running:
|
||||||
service.running:
|
service.running:
|
||||||
- name: {{ postgres.service }}
|
- name: {{ postgres.service.name }}
|
||||||
- enable: True
|
- enable: True
|
||||||
|
|
||||||
# Reload the service for changes made to `pg_ident.conf`, except for `MacOS`
|
# Reload the service for changes made to `pg_ident.conf`, except for `MacOS`
|
||||||
@@ -275,7 +284,7 @@ postgresql-running:
|
|||||||
postgresql-service-reload:
|
postgresql-service-reload:
|
||||||
module.wait:
|
module.wait:
|
||||||
- name: service.reload
|
- name: service.reload
|
||||||
- m_name: {{ postgres.service }}
|
- m_name: {{ postgres.service.name }}
|
||||||
- require:
|
- require:
|
||||||
- service: postgresql-running
|
- service: postgresql-running
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
postgresql-dead:
|
postgresql-dead:
|
||||||
service.dead:
|
service.dead:
|
||||||
- name: {{ postgres.service }}
|
- name: {{ postgres.service.name }}
|
||||||
- enable: False
|
- enable: False
|
||||||
|
|
||||||
postgresql-repo-removed:
|
postgresql-repo-removed:
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
shortcutName='${1}'
|
shortcutName="${1}"
|
||||||
app="postgres.app"
|
app="postgres.app"
|
||||||
Source="/Applications/$app"
|
Source="/Applications/$app"
|
||||||
Destination="{{ homes }}/{{ user }}/Desktop/${shortcutName}"
|
Destination="{{ homes }}/{{ user }}/Desktop/${shortcutName}"
|
||||||
/usr/bin/osascript -e "tell application \"Finder\" to make alias file to POSIX file \"$Source\" at POSIX file \"$Destination\""
|
/usr/bin/osascript -e "tell application \"Finder\" to make alias file to POSIX file \"$Source\" at POSIX file \"$Destination\""
|
||||||
|
|
||||||
|
|||||||
@@ -17,10 +17,19 @@ postgresql-profile:
|
|||||||
- defaults:
|
- defaults:
|
||||||
bin_dir: {{ postgres.bin_dir }}
|
bin_dir: {{ postgres.bin_dir }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
|
postgresql-pkg-deps:
|
||||||
|
pkg.installed:
|
||||||
|
- pkgs: {{ postgres.pkgs_deps }}
|
||||||
|
|
||||||
# Add upstream repository for your distro
|
# Add upstream repository for your distro
|
||||||
postgresql-repo:
|
postgresql-repo:
|
||||||
pkgrepo.managed:
|
pkgrepo.managed:
|
||||||
{{- format_kwargs(postgres.pkg_repo) }}
|
{{- format_kwargs(postgres.pkg_repo) }}
|
||||||
|
- require:
|
||||||
|
- pkg: postgresql-pkg-deps
|
||||||
|
- require_in:
|
||||||
|
- pkg: postgresql-server
|
||||||
|
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
|
|
||||||
@@ -39,6 +48,6 @@ postgresql-repo:
|
|||||||
postgresql-repo:
|
postgresql-repo:
|
||||||
test.show_notification:
|
test.show_notification:
|
||||||
- text: |
|
- text: |
|
||||||
PostgreSQL does not provide package repository for {{ grains['osfinger'] }}
|
PostgreSQL does not provide package repository for {{ salt['grains.get']('osfinger', grains.os) }}
|
||||||
|
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|||||||
30
pre-commit_semantic-release.sh
Executable file
30
pre-commit_semantic-release.sh
Executable file
@@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# (A) Update `FORMULA` with `${nextRelease.version}`
|
||||||
|
###############################################################################
|
||||||
|
sed -i -e "s_^\(version:\).*_\1 ${1}_" FORMULA
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# (B) Use `m2r` to convert automatically produced `.md` docs to `.rst`
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
# Install `m2r`
|
||||||
|
pip3 install m2r
|
||||||
|
|
||||||
|
# Copy and then convert the `.md` docs
|
||||||
|
cp ./*.md docs/
|
||||||
|
cd docs/ || exit
|
||||||
|
m2r --overwrite ./*.md
|
||||||
|
|
||||||
|
# Change excess `H1` headings to `H2` in converted `CHANGELOG.rst`
|
||||||
|
sed -i -e '/^=.*$/s/=/-/g' CHANGELOG.rst
|
||||||
|
sed -i -e '1,4s/-/=/g' CHANGELOG.rst
|
||||||
|
|
||||||
|
# Use for debugging output, when required
|
||||||
|
# cat AUTHORS.rst
|
||||||
|
# cat CHANGELOG.rst
|
||||||
|
|
||||||
|
# Return back to the main directory
|
||||||
|
cd ..
|
||||||
18
release-rules.js
Normal file
18
release-rules.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
// No release is triggered for the types commented out below.
|
||||||
|
// Commits using these types will be incorporated into the next release.
|
||||||
|
//
|
||||||
|
// NOTE: Any changes here must be reflected in `CONTRIBUTING.md`.
|
||||||
|
module.exports = [
|
||||||
|
{breaking: true, release: 'major'},
|
||||||
|
// {type: 'build', release: 'patch'},
|
||||||
|
// {type: 'chore', release: 'patch'},
|
||||||
|
// {type: 'ci', release: 'patch'},
|
||||||
|
{type: 'docs', release: 'patch'},
|
||||||
|
{type: 'feat', release: 'minor'},
|
||||||
|
{type: 'fix', release: 'patch'},
|
||||||
|
{type: 'perf', release: 'patch'},
|
||||||
|
{type: 'refactor', release: 'patch'},
|
||||||
|
{type: 'revert', release: 'patch'},
|
||||||
|
{type: 'style', release: 'patch'},
|
||||||
|
{type: 'test', release: 'patch'},
|
||||||
|
];
|
||||||
107
release.config.js
Normal file
107
release.config.js
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
module.exports = {
|
||||||
|
branch: 'master',
|
||||||
|
repositoryUrl: 'https://github.com/saltstack-formulas/postgres-formula',
|
||||||
|
plugins: [
|
||||||
|
['@semantic-release/commit-analyzer', {
|
||||||
|
preset: 'angular',
|
||||||
|
releaseRules: './release-rules.js',
|
||||||
|
}],
|
||||||
|
'@semantic-release/release-notes-generator',
|
||||||
|
['@semantic-release/changelog', {
|
||||||
|
changelogFile: 'CHANGELOG.md',
|
||||||
|
changelogTitle: '# Changelog',
|
||||||
|
}],
|
||||||
|
['@semantic-release/exec', {
|
||||||
|
prepareCmd: 'sh ./pre-commit_semantic-release.sh ${nextRelease.version}',
|
||||||
|
}],
|
||||||
|
['@semantic-release/git', {
|
||||||
|
assets: ['*.md', 'docs/*.rst', 'FORMULA'],
|
||||||
|
}],
|
||||||
|
'@semantic-release/github',
|
||||||
|
],
|
||||||
|
generateNotes: {
|
||||||
|
preset: 'angular',
|
||||||
|
writerOpts: {
|
||||||
|
// Required due to upstream bug preventing all types being displayed.
|
||||||
|
// Bug: https://github.com/conventional-changelog/conventional-changelog/issues/317
|
||||||
|
// Fix: https://github.com/conventional-changelog/conventional-changelog/pull/410
|
||||||
|
transform: (commit, context) => {
|
||||||
|
const issues = []
|
||||||
|
|
||||||
|
commit.notes.forEach(note => {
|
||||||
|
note.title = `BREAKING CHANGES`
|
||||||
|
})
|
||||||
|
|
||||||
|
// NOTE: Any changes here must be reflected in `CONTRIBUTING.md`.
|
||||||
|
if (commit.type === `feat`) {
|
||||||
|
commit.type = `Features`
|
||||||
|
} else if (commit.type === `fix`) {
|
||||||
|
commit.type = `Bug Fixes`
|
||||||
|
} else if (commit.type === `perf`) {
|
||||||
|
commit.type = `Performance Improvements`
|
||||||
|
} else if (commit.type === `revert`) {
|
||||||
|
commit.type = `Reverts`
|
||||||
|
} else if (commit.type === `docs`) {
|
||||||
|
commit.type = `Documentation`
|
||||||
|
} else if (commit.type === `style`) {
|
||||||
|
commit.type = `Styles`
|
||||||
|
} else if (commit.type === `refactor`) {
|
||||||
|
commit.type = `Code Refactoring`
|
||||||
|
} else if (commit.type === `test`) {
|
||||||
|
commit.type = `Tests`
|
||||||
|
} else if (commit.type === `build`) {
|
||||||
|
commit.type = `Build System`
|
||||||
|
// } else if (commit.type === `chore`) {
|
||||||
|
// commit.type = `Maintenance`
|
||||||
|
} else if (commit.type === `ci`) {
|
||||||
|
commit.type = `Continuous Integration`
|
||||||
|
} else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (commit.scope === `*`) {
|
||||||
|
commit.scope = ``
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof commit.hash === `string`) {
|
||||||
|
commit.shortHash = commit.hash.substring(0, 7)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof commit.subject === `string`) {
|
||||||
|
let url = context.repository
|
||||||
|
? `${context.host}/${context.owner}/${context.repository}`
|
||||||
|
: context.repoUrl
|
||||||
|
if (url) {
|
||||||
|
url = `${url}/issues/`
|
||||||
|
// Issue URLs.
|
||||||
|
commit.subject = commit.subject.replace(/#([0-9]+)/g, (_, issue) => {
|
||||||
|
issues.push(issue)
|
||||||
|
return `[#${issue}](${url}${issue})`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (context.host) {
|
||||||
|
// User URLs.
|
||||||
|
commit.subject = commit.subject.replace(/\B@([a-z0-9](?:-?[a-z0-9/]){0,38})/g, (_, username) => {
|
||||||
|
if (username.includes('/')) {
|
||||||
|
return `@${username}`
|
||||||
|
}
|
||||||
|
|
||||||
|
return `[@${username}](${context.host}/${username})`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// remove references that already appear in the subject
|
||||||
|
commit.references = commit.references.filter(reference => {
|
||||||
|
if (issues.indexOf(reference.issue) === -1) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
})
|
||||||
|
|
||||||
|
return commit
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
50
test/integration/default/README.md
Normal file
50
test/integration/default/README.md
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
# InSpec Profile: `default`
|
||||||
|
|
||||||
|
This shows the implementation of the `default` InSpec [profile](https://github.com/inspec/inspec/blob/master/docs/profiles.md).
|
||||||
|
|
||||||
|
## Verify a profile
|
||||||
|
|
||||||
|
InSpec ships with built-in features to verify a profile structure.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ inspec check default
|
||||||
|
Summary
|
||||||
|
-------
|
||||||
|
Location: default
|
||||||
|
Profile: profile
|
||||||
|
Controls: 4
|
||||||
|
Timestamp: 2019-06-24T23:09:01+00:00
|
||||||
|
Valid: true
|
||||||
|
|
||||||
|
Errors
|
||||||
|
------
|
||||||
|
|
||||||
|
Warnings
|
||||||
|
--------
|
||||||
|
```
|
||||||
|
|
||||||
|
## Execute a profile
|
||||||
|
|
||||||
|
To run all **supported** controls on a local machine use `inspec exec /path/to/profile`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ inspec exec default
|
||||||
|
..
|
||||||
|
|
||||||
|
Finished in 0.0025 seconds (files took 0.12449 seconds to load)
|
||||||
|
8 examples, 0 failures
|
||||||
|
```
|
||||||
|
|
||||||
|
## Execute a specific control from a profile
|
||||||
|
|
||||||
|
To run one control from the profile use `inspec exec /path/to/profile --controls name`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ inspec exec default --controls package
|
||||||
|
.
|
||||||
|
|
||||||
|
Finished in 0.0025 seconds (files took 0.12449 seconds to load)
|
||||||
|
1 examples, 0 failures
|
||||||
|
```
|
||||||
|
|
||||||
|
See an [example control here](https://github.com/inspec/inspec/blob/master/examples/profile/controls/example.rb).
|
||||||
18
test/integration/default/controls/command_spec.rb
Normal file
18
test/integration/default/controls/command_spec.rb
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
# Overide by Platform
|
||||||
|
pg_port = '5432'
|
||||||
|
pg_port = '5433' if (platform[:family] == 'debian') || (platform[:family] == 'suse')
|
||||||
|
|
||||||
|
control 'Postgres command' do
|
||||||
|
title 'should match desired lines'
|
||||||
|
|
||||||
|
# Can't use `%Q` here due to the `\`
|
||||||
|
describe command("su - postgres -c 'psql -p" + pg_port + %q( -qtc "\l+ db2"')) do
|
||||||
|
its(:stdout) do
|
||||||
|
should match(
|
||||||
|
/db2.*remoteUser.*UTF8.*en_US.UTF-8.*en_US.UTF-8.*my_space/
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
12
test/integration/default/controls/config_spec.rb
Normal file
12
test/integration/default/controls/config_spec.rb
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
control 'Postgres configuration' do
|
||||||
|
title 'should include the directory'
|
||||||
|
|
||||||
|
describe file('/srv/my_tablespace') do
|
||||||
|
it { should be_directory }
|
||||||
|
it { should be_owned_by 'postgres' }
|
||||||
|
it { should be_grouped_into 'postgres' }
|
||||||
|
its('mode') { should cmp '0700' }
|
||||||
|
end
|
||||||
|
end
|
||||||
24
test/integration/default/controls/services_spec.rb
Normal file
24
test/integration/default/controls/services_spec.rb
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
# Overide by Platform
|
||||||
|
service_name = 'postgresql'
|
||||||
|
pg_port = 5432
|
||||||
|
if (platform[:name] == 'centos') && platform[:release].start_with?('6')
|
||||||
|
service_name = 'postgresql-9.6'
|
||||||
|
elsif (platform[:family] == 'debian') || (platform[:family] == 'suse')
|
||||||
|
pg_port = 5433
|
||||||
|
end
|
||||||
|
|
||||||
|
control 'Postgres service' do
|
||||||
|
impact 0.5
|
||||||
|
title 'should be running and enabled'
|
||||||
|
|
||||||
|
describe service(service_name) do
|
||||||
|
it { should be_enabled }
|
||||||
|
it { should be_running }
|
||||||
|
end
|
||||||
|
|
||||||
|
describe port(pg_port) do
|
||||||
|
it { should be_listening }
|
||||||
|
end
|
||||||
|
end
|
||||||
18
test/integration/default/inspec.yml
Normal file
18
test/integration/default/inspec.yml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=yaml
|
||||||
|
---
|
||||||
|
name: default
|
||||||
|
title: postgres formula
|
||||||
|
maintainer: SaltStack Formulas
|
||||||
|
license: Apache-2.0
|
||||||
|
summary: Verify that the postgres formula is setup and configured correctly
|
||||||
|
supports:
|
||||||
|
- platform-name: debian
|
||||||
|
- platform-name: ubuntu
|
||||||
|
- platform-name: centos
|
||||||
|
- platform-name: fedora
|
||||||
|
- platform-name: opensuse
|
||||||
|
- platform-name: suse
|
||||||
|
- platform-name: freebsd
|
||||||
|
- platform-name: amazon
|
||||||
|
- platform-name: arch
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
require 'serverspec'
|
|
||||||
|
|
||||||
set :backend, :exec
|
|
||||||
|
|
||||||
describe service('postgresql') do
|
|
||||||
it { should be_enabled }
|
|
||||||
it { should be_running }
|
|
||||||
end
|
|
||||||
|
|
||||||
describe port('5432') do
|
|
||||||
it { should be_listening }
|
|
||||||
end
|
|
||||||
|
|
||||||
describe file('/srv/my_tablespace') do
|
|
||||||
it { should be_directory }
|
|
||||||
it { should be_mode 700 }
|
|
||||||
it { should be_owned_by 'postgres' }
|
|
||||||
it { should be_grouped_into 'postgres' }
|
|
||||||
end
|
|
||||||
|
|
||||||
describe command(%q{su - postgres -c 'psql -qtc "\l+ db2"'}) do
|
|
||||||
its(:stdout) { should match(/db2.*remoteUser.*UTF8.*en_US\.UTF-8.*en_US\.UTF-8.*my_space/) }
|
|
||||||
end
|
|
||||||
210
test/salt/pillar/postgres.sls
Normal file
210
test/salt/pillar/postgres.sls
Normal file
@@ -0,0 +1,210 @@
|
|||||||
|
# Port to use for the cluster -- can be used to provide a non-standard port
|
||||||
|
# NOTE: If already set in the minion config, that value takes priority
|
||||||
|
|
||||||
|
{%- if grains.os_family != 'Debian' and salt['grains.get']('osfinger') != 'Leap-15' %}
|
||||||
|
postgres.port: '5432'
|
||||||
|
{%- else %}
|
||||||
|
postgres.port: '5433'
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
postgres:
|
||||||
|
# UPSTREAM REPO
|
||||||
|
# Set True to configure upstream postgresql.org repository for YUM/APT/ZYPP
|
||||||
|
{%- if grains.os_family != 'Debian' and salt['grains.get']('osfinger') != 'CentOS-6' %}
|
||||||
|
use_upstream_repo: False
|
||||||
|
{%- else %}
|
||||||
|
use_upstream_repo: True
|
||||||
|
# Version to install from upstream repository (if upstream_repo: True)
|
||||||
|
{%- if not (grains.os_family == 'Debian') %}
|
||||||
|
version: '9.6'
|
||||||
|
{%- else %}
|
||||||
|
version: '10'
|
||||||
|
{%- endif %}
|
||||||
|
# # Set True to add a file in /etc/profile.d adding the bin dir in $PATH
|
||||||
|
# # as packages from upstream put them somewhere like /usr/pgsql-10/bin
|
||||||
|
# add_profile: False
|
||||||
|
# # If automatic package installation fails, use `fromrepo` to specify the
|
||||||
|
# # upstream repo to install packages from [#133, #185] (if upstream_repo: True)
|
||||||
|
# fromrepo: 'jessie-pgdg'
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
# ### MACOS
|
||||||
|
# # Set to 'postgresapp' OR 'homebrew' for MacOS
|
||||||
|
# # use_upstream_repo: 'postgresapp'
|
||||||
|
# # use_upstream_repo: 'homebrew'
|
||||||
|
|
||||||
|
# # PACKAGE
|
||||||
|
# # These pillars are typically never required.
|
||||||
|
# # pkg: 'postgresql'
|
||||||
|
# # pkg_client: 'postgresql-client'
|
||||||
|
# # service: postgresql
|
||||||
|
# pkgs_extra:
|
||||||
|
# - postgresql-contrib
|
||||||
|
# - postgresql-plpython
|
||||||
|
|
||||||
|
# CLUSTER
|
||||||
|
# The default `encoding` is derived from the `locale` so not recommended
|
||||||
|
# to provide a value for it unless necessary
|
||||||
|
cluster:
|
||||||
|
locale: en_US.UTF-8
|
||||||
|
# encoding: UTF8
|
||||||
|
|
||||||
|
# #'Alternatives system' priority incremental. 0 disables feature.
|
||||||
|
# linux:
|
||||||
|
# altpriority: 30
|
||||||
|
#
|
||||||
|
# # macos limits
|
||||||
|
# limits:
|
||||||
|
# soft: 64000
|
||||||
|
# hard: 128000
|
||||||
|
|
||||||
|
# POSTGRES
|
||||||
|
# Append the lines under this item to your postgresql.conf file.
|
||||||
|
# Pay attention to indent exactly with 4 spaces for all lines.
|
||||||
|
postgresconf: |-
|
||||||
|
listen_addresses = '*' # listen on all interfaces
|
||||||
|
|
||||||
|
# Path to the `pg_hba.conf` file Jinja template on Salt Fileserver
|
||||||
|
pg_hba.conf: salt://postgres/templates/pg_hba.conf.j2
|
||||||
|
|
||||||
|
# This section covers ACL management in the ``pg_hba.conf`` file.
|
||||||
|
# acls list controls: which hosts are allowed to connect, how clients
|
||||||
|
# are authenticated, which PostgreSQL user names they can use, which
|
||||||
|
# databases they can access. Records take one of these forms:
|
||||||
|
#
|
||||||
|
# acls:
|
||||||
|
# - ['local', 'DATABASE', 'USER', 'METHOD']
|
||||||
|
# - ['host', 'DATABASE', 'USER', 'ADDRESS', 'METHOD']
|
||||||
|
# - ['hostssl', 'DATABASE', 'USER', 'ADDRESS', 'METHOD']
|
||||||
|
# - ['hostnossl', 'DATABASE', 'USER', 'ADDRESS', 'METHOD']
|
||||||
|
#
|
||||||
|
# The uppercase items must be replaced by actual values.
|
||||||
|
# METHOD could be omitted, 'md5' will be appended by default.
|
||||||
|
#
|
||||||
|
# If ``acls`` item value is empty ('', [], null), then the contents of
|
||||||
|
# ``pg_hba.conf`` file will not be touched at all.
|
||||||
|
acls:
|
||||||
|
- ['local', 'db0', 'connuser', 'peer map=users_as_appuser']
|
||||||
|
- ['local', 'db1', 'localUser']
|
||||||
|
- ['host', 'db2', 'remoteUser', '192.168.33.0/24']
|
||||||
|
|
||||||
|
identity_map:
|
||||||
|
- ['users_as_appuser', 'jdoe', 'connuser']
|
||||||
|
- ['users_as_appuser', 'jsmith', 'connuser']
|
||||||
|
|
||||||
|
# Backup extension for configuration files, defaults to ``.bak``.
|
||||||
|
# Set ``False`` to stop creation of backups when config files change.
|
||||||
|
{%- if salt['status.time']|default(none) is callable %}
|
||||||
|
config_backup: ".backup@{{ salt['status.time']('%y-%m-%d_%H:%M:%S') }}"
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
{# {%- if grains['init'] == 'unknown' %} #}
|
||||||
|
{# #}
|
||||||
|
{# # If Salt is unable to detect init system running in the scope of state run, #}
|
||||||
|
{# # probably we are trying to bake a container/VM image with PostgreSQL. #}
|
||||||
|
{# # Use ``bake_image`` setting to control how PostgreSQL will be started: if set #}
|
||||||
|
{# # to ``True`` the raw ``pg_ctl`` will be utilized instead of packaged init #}
|
||||||
|
{# # script, job or unit run with Salt ``service`` state. #}
|
||||||
|
{# bake_image: True #}
|
||||||
|
{# #}
|
||||||
|
{# {%- endif %} #}
|
||||||
|
|
||||||
|
# Create/remove users, tablespaces, databases, schema and extensions.
|
||||||
|
# Each of these dictionaries contains PostgreSQL entities which
|
||||||
|
# mapped to the ``postgres_*`` Salt states with arguments. See the Salt
|
||||||
|
# documentation to get all supported argument for a particular state.
|
||||||
|
#
|
||||||
|
# Format is the following:
|
||||||
|
#
|
||||||
|
#<users|tablespaces|databases|schemas|extensions>:
|
||||||
|
# NAME:
|
||||||
|
# ensure: <present|absent> # 'present' is the default
|
||||||
|
# ARGUMENT: VALUE
|
||||||
|
# ...
|
||||||
|
#
|
||||||
|
# where 'NAME' is the state name, 'ARGUMENT' is the kwarg name, and
|
||||||
|
# 'VALUE' is kwarg value.
|
||||||
|
#
|
||||||
|
# For example, the Pillar:
|
||||||
|
#
|
||||||
|
# users:
|
||||||
|
# testUser:
|
||||||
|
# password: test
|
||||||
|
#
|
||||||
|
# will render such state:
|
||||||
|
#
|
||||||
|
# postgres_user-testUser:
|
||||||
|
# postgres_user.present:
|
||||||
|
# - name: testUser
|
||||||
|
# - password: test
|
||||||
|
users:
|
||||||
|
localUser:
|
||||||
|
ensure: present
|
||||||
|
password: '98ruj923h4rf'
|
||||||
|
createdb: False
|
||||||
|
createroles: False
|
||||||
|
inherit: True
|
||||||
|
replication: False
|
||||||
|
|
||||||
|
remoteUser:
|
||||||
|
ensure: present
|
||||||
|
password: '98ruj923h4rf'
|
||||||
|
createdb: False
|
||||||
|
createroles: False
|
||||||
|
inherit: True
|
||||||
|
replication: False
|
||||||
|
|
||||||
|
absentUser:
|
||||||
|
ensure: absent
|
||||||
|
|
||||||
|
# tablespaces to be created
|
||||||
|
tablespaces:
|
||||||
|
my_space:
|
||||||
|
directory: /srv/my_tablespace
|
||||||
|
owner: localUser
|
||||||
|
|
||||||
|
# databases to be created
|
||||||
|
databases:
|
||||||
|
db1:
|
||||||
|
owner: localUser
|
||||||
|
template: template0
|
||||||
|
lc_ctype: en_US.UTF-8
|
||||||
|
lc_collate: en_US.UTF-8
|
||||||
|
db2:
|
||||||
|
owner: remoteUser
|
||||||
|
template: template0
|
||||||
|
lc_ctype: en_US.UTF-8
|
||||||
|
lc_collate: en_US.UTF-8
|
||||||
|
tablespace: my_space
|
||||||
|
# set custom schema
|
||||||
|
schemas:
|
||||||
|
public:
|
||||||
|
owner: localUser
|
||||||
|
# enable per-db extension
|
||||||
|
{%- if grains.os_family == 'Debian' and salt['grains.get']('osfinger') != 'Debian-8' %}
|
||||||
|
extensions:
|
||||||
|
uuid-ossp:
|
||||||
|
schema: 'public'
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
# optional schemas to enable on database
|
||||||
|
schemas:
|
||||||
|
uuid-ossp:
|
||||||
|
dbname: db1
|
||||||
|
owner: localUser
|
||||||
|
|
||||||
|
# optional extensions to install in schema
|
||||||
|
{%- if grains.os_family == 'Debian' and salt['grains.get']('osfinger') != 'Debian-8' %}
|
||||||
|
extensions:
|
||||||
|
uuid-ossp:
|
||||||
|
schema: uuid-ossp
|
||||||
|
maintenance_db: db1
|
||||||
|
# postgis: {}
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
# remove:
|
||||||
|
# data: True
|
||||||
|
# multiple_releases: True
|
||||||
|
# releases: ['9.6', '10',]
|
||||||
|
|
||||||
|
# vim: ft=yaml ts=2 sts=2 sw=2 et
|
||||||
Reference in New Issue
Block a user