Compare commits
4 Commits
bbe07d297c
...
4d30fcf979
Author | SHA1 | Date |
---|---|---|
Tom Misilo | 4d30fcf979 | |
Thomas Misilo | d78cabffb6 | |
Thomas Misilo | 5d023b097d | |
jeanmonet | d55befc782 |
|
@ -8,6 +8,7 @@
|
|||
- name: example
|
||||
postgresql_users:
|
||||
- name: jdoe
|
||||
postgresql_data_dir: /psqldata
|
||||
|
||||
pre_tasks:
|
||||
# The Fedora 30+ container images have only C.UTF-8 installed
|
||||
|
|
|
@ -1,8 +1,19 @@
|
|||
---
|
||||
- name: Configure global settings.
|
||||
# `data_directory` in postgresql.conf set to `postgresql_data_dir` variable
|
||||
# Can be overridden in next task if `data_directory` parameter is also set
|
||||
# via `postgresql_global_config_options` var
|
||||
- name: Configure data dir in postgresql.conf.
|
||||
lineinfile:
|
||||
dest: "{{ postgresql_config_path }}/postgresql.conf"
|
||||
regexp: "^#?{{ item.option }}.+$"
|
||||
regexp: "^#?\\s*data_directory\\s*=.+$"
|
||||
line: "data_directory = '{{ postgresql_data_dir }}'"
|
||||
mode: 0644
|
||||
notify: restart postgresql
|
||||
|
||||
- name: Configure global settings (postgresql.conf).
|
||||
lineinfile:
|
||||
dest: "{{ postgresql_config_path }}/postgresql.conf"
|
||||
regexp: "^#?\\s*{{ item.option }}\\s*=.+$"
|
||||
line: "{{ item.option }} = '{{ item.value }}'"
|
||||
state: "{{ item.state | default('present') }}"
|
||||
mode: 0644
|
||||
|
|
Loading…
Reference in New Issue