mirror of https://gitlab.com/tildes/tildes.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
535 B
19 lines
535 B
---
|
|
- name: Install PostgreSQL
|
|
apt:
|
|
name: postgresql-{{ postgresql_version }}
|
|
|
|
- name: Start and enable PostgreSQL service
|
|
service:
|
|
name: postgresql
|
|
state: started
|
|
enabled: true
|
|
|
|
- name: Set configuration options in postgresql.conf
|
|
lineinfile:
|
|
path: /etc/postgresql/{{ postgresql_version }}/main/postgresql.conf
|
|
regexp: "^#?{{ item.key }} ?="
|
|
line: "{{ item.key }} = {{ item.value }}"
|
|
loop: "{{ _postgresql_settings | combine(postgresql_settings) | dict2items }}"
|
|
notify:
|
|
- Restart postgresql
|