From cf32fd59d3ce88a52fc4c369989ea97b4404c6fb Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Fri, 21 May 2021 11:58:14 +0200 Subject: [PATCH 2/4] test-nspawn: use pg_lsclusters to find the current postgres port (#54189) --- test-nspawn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test-nspawn b/test-nspawn index 3ed37b9..8aa4b3b 100755 --- a/test-nspawn +++ b/test-nspawn @@ -21,5 +21,7 @@ then apt-key add entrouvert.gpg apt update /etc/init.d/postgresql start - su testuser -l -c 'cd /opt/publik-devinst; ansible-playbook -i inventory.yml -e "{postgresql_port: 5433}" install.yml' + PORT=`pg_lsclusters | tail -n1 | awk '{ print $3 }'` + echo 'cd /opt/publik-devinst; ansible-playbook -i inventory.yml -e "{postgresql_port: '$PORT'}" install.yml' + su testuser -l -c 'cd /opt/publik-devinst; ansible-playbook -i inventory.yml -e "{postgresql_port: '$PORT'}" install.yml' fi -- 2.32.0.rc0