1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

patch 0002

This commit is contained in:
George Hunt 2017-05-27 16:10:45 -07:00
parent 3a1d427ea0
commit cb344d7d47
60 changed files with 211 additions and 172 deletions

View file

@ -8,13 +8,13 @@
- name: Install postgresql for debian
package: name=postgresql-client
when: is_debian
when: is_debuntu
tags:
- download
- name: Install postgresql for fedora
package: name=postgresql-server
when: not is_debian
when: not is_debuntu
tags:
- download
@ -35,21 +35,26 @@
- name: make sure that the en_US locale is enabled
lineinfile: dest=/etc/locale.gen
line="{{ postgresql_locale }} UTF-8"
when: is_debian
when: is_debuntu
- name: generate the selected locales
command: /usr/sbin/locale-gen
when: is_debian
when: is_debuntu
- name: Initialize the postgres db
command: su - postgres -c "/usr/lib/postgresql/9.4/bin/initdb -E 'UTF-8' --locale={{ postgresql_locale }} -D /library/pgsql-xs"
creates=/library/pgsql-xs/pg_hba.conf
when: is_debian
- name: Initialize the postgres db
command: su - postgres -c "/usr/lib/postgresql/9.5/bin/initdb -E 'UTF-8' --locale={{ postgresql_locale }} -D /library/pgsql-xs"
creates=/library/pgsql-xs/pg_hba.conf
when: is_ubuntu
- name: Initialize the postgres db
command: su - postgres -c "/usr/bin/initdb -E 'UTF-8' --lc-collate={{ postgresql_locale }} --lc-ctype={{ postgresql_locale }} -D /library/pgsql-xs"
creates=/library/pgsql-xs/pg_hba.conf
when: not is_debian
when: not is_debuntu
- name: Configure postgres
template: backup=yes

View file

@ -1,4 +1,4 @@
{% if is_debian %}
{% if is_debuntu %}
[Unit]
Description=PostgreSQL database server
After=network.target
@ -27,9 +27,9 @@ Environment=PGSTARTTIMEOUT=270
Environment=PGDATA=/library/pgsql-xs
ExecStart=/usr/lib/postgresql/9.4/bin/pg_ctl start -D ${PGDATA} -s -w -t ${PGSTARTTIMEOUT}
ExecStop=/usr/lib/postgresql/9.4/bin/pg_ctl stop -D ${PGDATA} -s -m fast
ExecReload=/usr/lib/postgresql/9.4/bin/pg_ctl reload -D ${PGDATA} -s
ExecStart=/usr/lib/postgresql/{{ postgresql_version }}/bin/pg_ctl start -D ${PGDATA} -s -w -t ${PGSTARTTIMEOUT}
ExecStop=/usr/lib/postgresql/{{ postgresql_version }}/bin/pg_ctl stop -D ${PGDATA} -s -m fast
ExecReload=/usr/lib/postgresql/{{ postgresql_version }}/bin/pg_ctl reload -D ${PGDATA} -s
# Give a reasonable amount of time for the server to start up/shut down.
# Ideally, the timeout for starting PostgreSQL server should be handled more