haproxy_update plugin:
This plugin allows the updating of HAProxy servers with the new replication set configuration.
the plugin includes a template configuration file haproxy_pg.conf.template which contains 3 pools:
general pool - connects to all servers
master pool - points to the master server
slave pool - connects to all the replica servers

the plugin can be used in the extra failover commands or to run by itself.