Created
April 18, 2014 17:33
-
-
Save UtahDave/11055416 to your computer and use it in GitHub Desktop.
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
locale-gen en_US.UTF-8: # Locale must exist | |
cmd.run: | |
- unless: locale -a | grep -q en_US.utf8 | |
en_US.UTF-8: | |
locale.system: | |
- require: | |
- cmd: locale-gen en_US.UTF-8 | |
postgresql: | |
pkg.installed: | |
- names: | |
- postgresql-9.1 | |
- postgresql-contrib-9.1 | |
- env: | |
LC_ALL: en_US.UTF-8 # NOTE! No - and two more spaces here. | |
- require: | |
- locale: en_US.UTF-8 | |
/etc/postgresql/9.1/main: | |
file.directory: | |
- user: postgres | |
- group: postgres | |
- dir_mode: 755 | |
- makedirs: true | |
- require: | |
- pkg: postgresql | |
postgres-hba-conf: | |
file.managed: | |
- name: /etc/postgresql/9.1/main/pg_hba.conf | |
- source: salt://postgresql/pg_hba.conf | |
- user: postgres | |
- group: postgres | |
- require: | |
- file: /etc/postgresql/9.1/main | |
postgres-conf: | |
file.managed: | |
- name: /etc/postgresql/9.1/main/postgresql.conf | |
- source: salt://postgresql/postgresql.conf | |
- group: postgres | |
- require: | |
- file: /etc/postgresql/9.1/main | |
postgresql-service: | |
service.running: | |
- name: postgresql | |
- enable: True | |
- require: | |
- pkg: postgresql | |
- watch: | |
- file: postgres-conf | |
- file: postgres-hba-conf |
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
# PostgreSQL Client Authentication Configuration File | |
# =================================================== | |
# | |
# TYPE DATABASE USER ADDRESS METHOD | |
# IPv4 local connections: | |
host all all 127.0.0.1/32 md5 | |
# IPv6 local connections: | |
host all all ::1/128 md5 | |
local all all ident | |
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
# ----------------------------- | |
# PostgreSQL configuration file | |
# ----------------------------- | |
data_directory = '/var/lib/postgresql/9.1/main' # use data in another directory | |
hba_file = '/etc/postgresql/9.1/main/pg_hba.conf' # host-based authentication file | |
ident_file = '/etc/postgresql/9.1/main/pg_ident.conf' # ident configuration file | |
external_pid_file = '/var/run/postgresql/9.1-main.pid' # write an extra PID file | |
shared_buffers = 24MB | |
log_line_prefix = '%t ' # special values: | |
# These settings are initialized by initdb, but they can be changed. | |
lc_messages = 'en_US.UTF-8' # locale for system error message | |
# strings | |
lc_monetary = 'en_US.UTF-8' # locale for monetary formatting | |
lc_numeric = 'en_US.UTF-8' # locale for number formatting | |
lc_time = 'en_US.UTF-8' # locale for time formatting | |
# default configuration for text search | |
default_text_search_config = 'pg_catalog.english' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment