Skip to content
Closed
Prev Previous commit
Next Next commit
Added sysconfig custom configuration template and task for RHEL/Upsta…
…rt distros
  • Loading branch information
dracic committed Oct 8, 2019
commit 495af4826b371dd29b7c48ac87083431aef0719b
13 changes: 12 additions & 1 deletion tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,17 @@
- reload systemd
- restart postgresql

- name: PostgreSQL | Use the conf directory when starting the Postgres service | RedHat | Upstart
template:
src: etc_sysconfig_pgsql_postgresql.j2
dest: "/etc/sysconfig/pgsql/postgresql-{{ postgresql_version }}"
when:
- ansible_os_family == "RedHat"
- ansible_service_mgr == "upstart"
register: postgresql_upstart_custom_conf
notify:
- restart postgresql

- name: PostgreSQL | Ensure the pid directory for PostgreSQL exists
file:
name: "{{ postgresql_pid_directory }}"
Expand All @@ -230,4 +241,4 @@
service:
name: "{{ postgresql_service_name }}"
state: reloaded
when: postgresql_configuration_pt1.changed or postgresql_configuration_pt2.changed or postgresql_configuration_pt3.changed or postgresql_systemd_custom_conf.changed
when: postgresql_configuration_pt1.changed or postgresql_configuration_pt2.changed or postgresql_configuration_pt3.changed or postgresql_systemd_custom_conf.changed or postgresql_systemd_custom_conf.changed
1 change: 1 addition & 0 deletions templates/etc_sysconfig_pgsql_postgresql.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PGDATA={{ postgresql_conf_directory }}