Last active
May 17, 2016 06:15
-
-
Save flowolf/b902a6c5e06f8e529940e77e61ab7fab to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# my working salt postgres config (updated since first post on IRC #salt) | |
postgres_server: | |
pkg: | |
- installed | |
- pkgs: | |
- postgresql | |
service: | |
- running | |
- name: postgresql | |
- enable: True | |
my_db_user: | |
postgres_user.present: | |
- name: {{ pillar['my_db']['user'] }} | |
- password: {{ pillar['my_db']['password'] }} | |
my_db: | |
postgres_database.present: | |
- name: {{ pillar['my_db']['name'] }} | |
- owner: {{ pillar['my_db']['user'] }} | |
# important not to use UTF-8 but UTF8, database will create fine, but will print error on second run. | |
- encoding: UTF8 | |
- require: | |
- postgres_user: {{ pillar['my_db']['user'] }} | |
## too much info, didn't need that: | |
## - user: postgres | |
## - db_user: {{ pillar['my_db']['user'] }} | |
## - db_password: {{ pillar['my_db']['password'] }} | |
## - db_host: 127.0.0.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment