aboutsummaryrefslogtreecommitdiffstats
path: root/roles/jails/02_postgres
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2026-07-12 19:06:43 +0300
committerJan Tuomi <jan@jantuomi.fi>2026-07-12 19:06:43 +0300
commitcb6f6bb766edf6a409545f4609ca633dabe97a2a (patch)
treea9c3dbfa3f518ab2de0ef611649348a25bcc36b9 /roles/jails/02_postgres
parentc4ccb8a8a8e6f1435c4db7873baa0df21295252f (diff)
Improve volume handling, add migration confirmation step
Diffstat (limited to 'roles/jails/02_postgres')
-rw-r--r--roles/jails/02_postgres/defaults/main.yml3
-rw-r--r--roles/jails/02_postgres/tasks/main.yml9
2 files changed, 3 insertions, 9 deletions
diff --git a/roles/jails/02_postgres/defaults/main.yml b/roles/jails/02_postgres/defaults/main.yml
index d16d128..fa18195 100644
--- a/roles/jails/02_postgres/defaults/main.yml
+++ b/roles/jails/02_postgres/defaults/main.yml
@@ -4,6 +4,9 @@ devfs_ruleset: 5
zfs:
- name: zroot/jails/volumes/postgres_data
mountpoint: /var/db/postgres
+ owner: "770"
+ group: "770"
+ mode: "0755"
jail_conf_options:
- "allow.raw_sockets"
diff --git a/roles/jails/02_postgres/tasks/main.yml b/roles/jails/02_postgres/tasks/main.yml
index 81d357a..8ce0864 100644
--- a/roles/jails/02_postgres/tasks/main.yml
+++ b/roles/jails/02_postgres/tasks/main.yml
@@ -7,15 +7,6 @@
path: /var/db/postgres/data18/PG_VERSION
register: _pg_data
-- name: Set postgres data directory ownership
- file:
- path: /var/db/postgres
- state: directory
- owner: postgres
- group: postgres
- mode: "0755"
- when: not _pg_data.stat.exists
-
- name: Initialize database
shell: /usr/local/etc/rc.d/postgresql initdb
when: not _pg_data.stat.exists