Skip to content

Commit a112d56

Browse files
committed
fix: install extensions from shell command
1 parent 6f4bd85 commit a112d56

File tree

5 files changed

+49
-15
lines changed

5 files changed

+49
-15
lines changed

ansible/tasks/setup-docker.yml

+40-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
src: files/extensions/
44
dest: /tmp/extensions/
55

6+
# Builtin apt module does not support wildcard for deb paths
67
- name: Install extensions
7-
apt:
8-
deb: "/tmp/extensions/{{ item | basename }}"
9-
with_fileglob: "files/extensions/*.deb"
8+
shell: apt-get install -y --no-install-recommends /tmp/extensions/*.deb
109

1110
- name: pg_cron - set cron.database_name
1211
become: yes
@@ -36,6 +35,44 @@
3635
state: present
3736
line: auto_explain.log_min_duration = 10s
3837

38+
# supautils
39+
- name: supautils - add supautils to session_preload_libraries
40+
become: yes
41+
replace:
42+
path: /etc/postgresql/postgresql.conf
43+
regexp: "#session_preload_libraries = ''"
44+
replace: session_preload_libraries = 'supautils'
45+
46+
- name: supautils - write custom supautils.conf
47+
template:
48+
src: "files/postgresql_config/supautils.conf.j2"
49+
dest: /etc/postgresql-custom/supautils.conf
50+
mode: 0664
51+
owner: postgres
52+
group: postgres
53+
54+
- name: supautils - copy extension custom scripts
55+
copy:
56+
src: files/postgresql_extension_custom_scripts/
57+
dest: /etc/postgresql-custom/extension-custom-scripts
58+
become: yes
59+
60+
- name: supautils - chown extension custom scripts
61+
file:
62+
mode: 0775
63+
owner: postgres
64+
group: postgres
65+
path: /etc/postgresql-custom/extension-custom-scripts
66+
recurse: yes
67+
become: yes
68+
69+
- name: supautils - include /etc/postgresql-custom/supautils.conf in postgresql.conf
70+
become: yes
71+
replace:
72+
path: /etc/postgresql/postgresql.conf
73+
regexp: "#include = '/etc/postgresql-custom/supautils.conf'"
74+
replace: "include = '/etc/postgresql-custom/supautils.conf'"
75+
3976
- name: Cleanup - extension packages
4077
file:
4178
path: /tmp/extensions

ansible/tasks/setup-supabase-internal.yml

-3
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@
8080
- name: Install Postgres exporter
8181
import_tasks: internal/postgres-exporter.yml
8282

83-
- name: Install supautils
84-
import_tasks: internal/supautils.yml
85-
8683
- name: Install admin-mgr
8784
import_tasks: internal/admin-mgr.yml
8885

ansible/tasks/setup-system.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@
3232
update-alternatives --set ebtables /usr/sbin/ebtables-nft
3333
systemctl restart ufw
3434
35+
- name: Install other useful tools
36+
apt:
37+
pkg:
38+
- sysstat
39+
update_cache: yes
40+
3541
- name: Configure sysstat
3642
copy:
3743
src: files/sysstat.sysstat
@@ -46,12 +52,6 @@
4652
file:
4753
path: /var/log/sysstat
4854
state: directory
49-
50-
- name: Install other useful tools
51-
apt:
52-
pkg:
53-
- sysstat
54-
update_cache: yes
5555

5656
- name: Adjust APT update intervals
5757
copy:

common.vars.pkr.hcl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
postgres-version = "15.1.0.85"
1+
postgres-version = "15.1.0.86-rc0"

ebssurrogate/scripts/chroot-bootstrap.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ function cleanup_cache {
223223

224224
update_install_packages
225225
setup_locale
226-
install_packages_for_build
226+
#install_packages_for_build
227227
install_configure_grub
228228
setup_apparmor
229229
setup_hostname
@@ -233,5 +233,5 @@ setup_eth0_interface
233233
disable_ufw_ipv6
234234
disable_sshd_passwd_auth
235235
disable_fsck
236-
setup_ccache
236+
#setup_ccache
237237
cleanup_cache

0 commit comments

Comments
 (0)