Compare commits

...

5 Commits

Author SHA1 Message Date
Tom Misilo bbe07d297c
Merge a13293f262 into 156d056c8f 2024-01-31 17:11:36 -07:00
Jeff Geerling 156d056c8f Make local dev with molecule a little easier. 2024-01-24 22:00:25 -06:00
Thomas Misilo a13293f262
Do not flush handlers, ubuntu 22 at least appears to play nice 2023-06-26 08:36:43 -05:00
Thomas Misilo 92e7895d7c
Test setting custom postgresql data directory 2023-06-26 08:36:30 -05:00
jeanmonet e6811b5ca7 Fixes #158, #40, #124: Custom Data Directory
Fixes #158, #40, #124 allowing for a custom data directory
2023-06-26 08:12:57 -05:00
5 changed files with 23 additions and 9 deletions

View File

@ -19,12 +19,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: 'geerlingguy.postgresql'
- name: Set up Python 3.
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'
@ -52,12 +52,12 @@ jobs:
steps:
- name: Check out the codebase.
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: 'geerlingguy.postgresql'
- name: Set up Python 3.
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'

View File

@ -22,12 +22,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: 'geerlingguy.postgresql'
- name: Set up Python 3.
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'

View File

@ -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

View File

@ -2,11 +2,13 @@
role_name_check: 1
dependency:
name: galaxy
options:
ignore-errors: true
driver:
name: docker
platforms:
- name: instance
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
image: "geerlingguy/docker-${MOLECULE_DISTRO:-rockylinux8}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw

View File

@ -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