Advertisement
Guest User

Untitled

a guest
Jun 6th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. in state I have:
  2.  
  3. top.sls:
  4. base:
  5. '*':
  6. - common
  7. 'G@roles:postgresql-slave and G@environment:test':
  8. - match: compound
  9. - database.postgresql-slave
  10.  
  11.  
  12. database/postgresql.sls:
  13. postgresql:
  14. pkg.installed:
  15. - pkgs:
  16. - dev-db/postgresql
  17. - dev-db/postgis
  18. - dev-db/postgres-pg_modules
  19.  
  20. database/postgresql-slave.sls:
  21. include postgresql
  22.  
  23. {% for conf_file in 'pg_hba.conf', 'pg_ident.conf', 'postgresql.conf', 'recovery.conf' %}
  24. {{ conf_file }}:
  25. file.managed:
  26. - name: /etc/postgresql-9.5/{{ conf_file }}
  27. - source: salt://database/files/{{ conf_file }}
  28. - user: postgres
  29. - group: postgres
  30. - mode: 644
  31. - template: jinja
  32. - defaults:
  33. replication_password: {{ pillar['postgresql']['replication_password'] }}
  34. {% endfor %}
  35.  
  36. salt shows this error:
  37.  
  38. [CRITICAL] Rendering SLS 'base:database.postgresql-slave' failed: mapping values are not allowed here; line 4
  39.  
  40. ---
  41. include postgresql
  42.  
  43.  
  44. pg_hba.conf: <======================
  45. file.managed:
  46. - name: /etc/postgresql-9.5/pg_hba.conf
  47. - source: salt://database/files/pg_hba.conf
  48. - user: postgres
  49. - group: postgres
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement