Issue #2: Another batch of fixes, mostly for CentOS 6.
This commit is contained in:
parent
c35921281d
commit
dbd07263e0
|
@ -7,6 +7,10 @@ postgresql_group: postgres
|
|||
|
||||
postgresql_unix_socket_dir: /var/run/postgresql
|
||||
|
||||
postgresql_global_config_options:
|
||||
- option: unix_socket_directory
|
||||
value: '{{ postgresql_unix_socket_dir }}'
|
||||
|
||||
# Debian only. Used to generate the locales used by PostgreSQL databases.
|
||||
postgresql_locales:
|
||||
- 'en_US.UTF-8'
|
||||
|
|
|
@ -6,6 +6,21 @@
|
|||
mode: 0644
|
||||
notify: restart postgresql
|
||||
|
||||
- name: Configure global settings.
|
||||
lineinfile:
|
||||
dest: "{{ postgresql_config_path }}/postgresql.conf"
|
||||
regexp: "^#?{{ item.option }}.+$"
|
||||
line: "{{ item.option }} = '{{ item.value }}'"
|
||||
state: "{{ item.state | default('present') }}"
|
||||
with_items: "{{ postgresql_global_config_options }}"
|
||||
notify: restart postgresql
|
||||
|
||||
- name: Ensure PostgreSQL unix socket dir exists.
|
||||
file:
|
||||
path: "{{ postgresql_unix_socket_dir }}"
|
||||
state: directory
|
||||
mode: 0777
|
||||
|
||||
- name: Ensure PostgreSQL data directory exists.
|
||||
file:
|
||||
path: "{{ postgresql_data_dir }}"
|
||||
|
|
|
@ -32,3 +32,8 @@
|
|||
set_fact:
|
||||
postgresql_bin_path: "{{ __postgresql_bin_path }}"
|
||||
when: postgresql_bin_path is not defined
|
||||
|
||||
- name: Define postgresql_config_path.
|
||||
set_fact:
|
||||
postgresql_config_path: "{{ __postgresql_config_path }}"
|
||||
when: postgresql_config_path is not defined
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
__postgresql_version: "9.4"
|
||||
__postgresql_data_dir: "/var/lib/postgresql/{{ __postgresql_version }}/main"
|
||||
__postgresql_bin_path: "/usr/lib/postgresql/{{ __postgresql_version }}/bin"
|
||||
__postgresql_config_path: "/etc/postgresql/{{ __postgresql_version }}/main"
|
||||
__postgresql_daemon: postgresql
|
||||
__postgresql_packages:
|
||||
- postgresql
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
__postgresql_version: "9.2"
|
||||
__postgresql_data_dir: "/var/lib/pgsql/data"
|
||||
__postgresql_bin_path: "/usr/bin"
|
||||
__postgresql_config_path: "/var/lib/pgsql/data"
|
||||
__postgresql_daemon: postgresql
|
||||
__postgresql_packages:
|
||||
- postgresql
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
__postgresql_version: "9.3"
|
||||
__postgresql_data_dir: "/var/lib/postgresql/{{ __postgresql_version }}/main"
|
||||
__postgresql_bin_path: "/usr/lib/postgresql/{{ __postgresql_version }}/bin"
|
||||
__postgresql_config_path: "/etc/postgresql/{{ __postgresql_version }}/main"
|
||||
__postgresql_daemon: postgresql
|
||||
__postgresql_packages:
|
||||
- postgresql
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
__postgresql_version: "9.5"
|
||||
__postgresql_data_dir: "/var/lib/postgresql/{{ __postgresql_version }}/main"
|
||||
__postgresql_bin_path: "/usr/lib/postgresql/{{ __postgresql_version }}/bin"
|
||||
__postgresql_config_path: "/etc/postgresql/{{ __postgresql_version }}/main"
|
||||
__postgresql_daemon: postgresql
|
||||
__postgresql_packages:
|
||||
- postgresql
|
||||
|
|
Loading…
Reference in New Issue