Fixing issues with Centos (initdb, and service name).

This commit is contained in:
Berry Langerak
2014-10-06 10:14:34 +02:00
parent f96844c7c0
commit aef555ad80
2 changed files with 26 additions and 8 deletions

View File

@@ -16,6 +16,17 @@ create-postgresql-cluster:
LC_ALL: C.UTF-8
{% endif %}
{% if postgres.init_db != False %}
postgresql-initdb:
cmd.run:
- cwd: /
- user: root
- name: service postgresql initdb
- unless: test -f {{ postgres.conf_dir }}/postgresql.conf
- env:
LC_ALL: C.UTF-8
{% endif %}
run-postgresql:
service.running:
- enable: true
@@ -23,14 +34,13 @@ run-postgresql:
- require:
- pkg: {{ postgres.pkg }}
{% if postgres.pkg_dev != False %}
install-postgres-dev-package:
pkg.installed:
- name: {{ postgres.pkg_dev }}
{% endif %}
libpq-dev:
pkg.installed
python-dev:
{{ postgres.pkg_libpq_dev }}:
pkg.installed
{% if 'pg_hba.conf' in pillar.get('postgres', {}) %}