On each Agent node, stop the Agent.
ambari-agent stop
Remove old Agent certificates.
rm /var/lib/ambari-agent/keys/*
Using a text editor, edit
/etc/ambari-agent/conf/ambari-agent.ini
to point to the new host.[server] hostname=$NEW FULLY.QUALIFIED.DOMAIN.NAME url_port=8440 secured_url_port=8441