ansible-roles/postgresql/tasks/config.yml

35 lines
908 B
YAML
Raw Normal View History

2016-12-22 16:12:34 +01:00
---
2020-03-09 17:59:17 +01:00
- name: Override PostgreSQL systemd unit
template:
src: postgresql.service.j2
dest: /etc/systemd/system/multi-user.target.wants/postgresql.service
force: yes
notify:
- reload systemd
- restart postgresql
2016-12-22 16:12:34 +01:00
- name: Allow conf.d/*.conf files to be included in PostgreSQL configuration
lineinfile:
name: "/etc/postgresql/{{postgresql_version}}/main/postgresql.conf"
2016-12-22 16:12:34 +01:00
line: include_dir = 'conf.d'
notify: restart postgresql
- name: Create conf.d directory
file:
name: "/etc/postgresql/{{postgresql_version}}/main/conf.d/"
2016-12-22 16:12:34 +01:00
state: directory
owner: postgres
group: postgres
mode: "0755"
2016-12-22 16:12:34 +01:00
- name: Copy PostgreSQL config file
template:
src: postgresql.conf.j2
dest: "/etc/postgresql/{{postgresql_version}}/main/conf.d/zz-evolinux.conf"
2016-12-22 16:12:34 +01:00
owner: postgres
group: postgres
mode: "0644"
2016-12-22 16:12:34 +01:00
notify: restart postgresql
- meta: flush_handlers