Skip to content

Instantly share code, notes, and snippets.

@silenius
Created March 23, 2018 14:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save silenius/51c066fb77f42661aa976dce944b4af0 to your computer and use it in GitHub Desktop.
Save silenius/51c066fb77f42661aa976dce944b4af0 to your computer and use it in GitHub Desktop.
salt% cat config.sls
include:
- pgbouncer.install
- pgbouncer.service
{% set pgbouncer = salt.pillar.get('pgbouncer') %}
pgbouncer_ini:
ini.options_present:
- name: {{ pgbouncer.lookup.config }}
- sections:
{{ pgbouncer.config|yaml|indent(2) }}
databases:
'*': auth_user = pgbouncer
- require:
- pkg: pgbouncer
- watch_in:
- service: pgbouncer_service
salt% salt chouffe.prod.lan state.show_sls pgbouncer
[WARNING ] Failed to open log file, do you have permission to write to /var/log/salt/master?
chouffe.prod.lan:
- Rendering SLS 'base:pgbouncer.config' failed: while parsing a block mapping
in "<string>", line 10, column 7:
- sections:
^
expected <block end>, but found '<block mapping start>'
in "<string>", line 13, column 9:
databases:
^
ERROR: Minions returned with non-zero exit code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment