Last active
June 6, 2016 10:09
-
-
Save jakshi/0c2dd28020991b6d575176e4ab5132fa to your computer and use it in GitHub Desktop.
salt issue
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
in state I have: | |
top.sls: | |
base: | |
'*': | |
- common | |
'G@roles:postgresql-slave and G@environment:test': | |
- match: compound | |
- database.postgresql-slave | |
database/postgresql.sls: | |
postgresql: | |
pkg.installed: | |
- pkgs: | |
- dev-db/postgresql | |
- dev-db/postgis | |
- dev-db/postgres-pg_modules | |
database/postgresql-slave.sls: | |
include postgresql | |
{% for conf_file in 'pg_hba.conf', 'pg_ident.conf', 'postgresql.conf', 'recovery.conf' %} | |
{{ conf_file }}: | |
file.managed: | |
- name: /etc/postgresql-9.5/{{ conf_file }} | |
- source: salt://database/files/{{ conf_file }} | |
- user: postgres | |
- group: postgres | |
- mode: 644 | |
- template: jinja | |
- defaults: | |
replication_password: {{ pillar['postgresql']['replication_password'] }} | |
{% endfor %} | |
salt shows this error: | |
[CRITICAL] Rendering SLS 'base:database.postgresql-slave' failed: mapping values are not allowed here; line 4 | |
--- | |
include postgresql | |
pg_hba.conf: <====================== | |
file.managed: | |
- name: /etc/postgresql-9.5/pg_hba.conf | |
- source: salt://database/files/pg_hba.conf | |
- user: postgres | |
- group: postgres |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment