-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(pgsql): do not try to create db and user with schema
- Loading branch information
Showing
4 changed files
with
44 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{% from "zabbix/map.jinja" import zabbix with context -%} | ||
{% set settings = salt['pillar.get']('zabbix-pgsql', {}) -%} | ||
{% set defaults = zabbix.get('pgsql', {}) -%} | ||
# Install packages required for Salt postgres module | ||
{% if settings.get('pkgs', defaults.get('pkgs', False)) | ||
and not settings.get('skip_pkgs', defaults.skip_pkgs) -%} | ||
pgsql_packages: | ||
pkg.installed: | ||
- pkgs: {{ settings.get('pkgs', defaults.pkgs)|json }} | ||
{% elif settings.get('skip_pkgs', defaults.skip_pkgs) -%} | ||
pgsql_packages: | ||
test.configurable_test_state: | ||
- name: You skipped installation of packages required for Salt postgres module. | ||
- changes: False | ||
- result: True | ||
{% else -%} | ||
pgsql_packages: | ||
test.configurable_test_state: | ||
- name: Packages required for Salt postgres module are not defined | ||
- changes: False | ||
- result: False | ||
- comment: | | ||
Additional packages are required to manage the PostgreSQL database. | ||
Please specify them in pillar as list. | ||
Tip: you need postgresql-client packages, like: | ||
zabbix-pgsql: | ||
pkgs: | ||
- postgresql-client-common | ||
- postgresql-client | ||
Or you can skip installing them, but formula likely fail without them. | ||
zabbix-pgsql: | ||
skip_pkgs: True | ||
{% endif -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters