Skip to content

Commit

Permalink
Update aws private ip address information
Browse files Browse the repository at this point in the history
  • Loading branch information
feikesteenbergen committed May 15, 2015
1 parent 442a225 commit 2f57c51
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions postgres-appliance/postgres_ha.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ WALE_ENV_DIR=/home/postgres/etc/wal-e.d/env

function write_postgres_yaml
{
local_address=$(cat /etc/hosts |grep ${HOSTNAME}|cut -f1)
aws_private_ip=$(curl -s http://169.254.169.254/latest/meta-data/local-ipv4)
cat >> postgres.yml <<__EOF__
loop_wait: 10
aws_use_host_address: "on"
etcd:
scope: $SCOPE
ttl: 30
host: 127.0.0.1:8080
postgresql:
name: postgresql_${HOSTNAME}
listen: ${local_address}:5432
listen: 0.0.0.0:5432
connect_address: {aws_private_ip}:5432
data_dir: $PGDATA
replication:
username: standby
Expand Down

0 comments on commit 2f57c51

Please sign in to comment.