Check Point provides an Ansible module for this, too:
https://docs.ansible.com/ansible/latest/collections/check_point/mgmt/cp_mgmt_set_ha_state_module.htm...
Note, however, that the management server API set-ha-state is only available since R80.40 + Jumbo HFA 78. Likewise, you also need Ansible module v5.0.0 or higher. Be sure you have these minimum requirements.
Setup your Ansible inventory for each MDS, plus each domain, in an organized way, and you can automate this process to ensure consistency and that you don't miss anything.