TL/DR: The script promotes the new master, then notifies the pgbouncer nodes of the new master by generating a new database stanza for the pgbouncer nodes, then sends a reload command to the pgbouncer node.
Update promote_command in repmgr.conf to use the script
Need to debug the script a little better(mostly it's use of psql), but it is executed by the node that was chosen as the new master. Manually executing the failed steps, somewhat corrected, was successful.
Each db node needs to know about each pgbouncer node. So adding/removing pgbouncer nodes will need to propagate to the database nodes.
the new master database node needs to execute a command on each of the pgbouncer nodes when it's promoted. We'll need to account for the possibility that a pgbouncer node is unreachable during failover.