Update trellis domain name for staging or production while still pointing to the same server IP

So I have a couple trellis deploys, local, staging and prod and they point to staging.domain.org.za and domain.org.za
I am about to point domain.org (no za) to the same AWS EC2 instance and my plan was just to update the group_vars from:

wordpress_sites:
  saharvest.org:
    site_hosts:
    - canonical: saharvest.org.za
      redirects:
      - www.saharvest.org.za

to

wordpress_sites:
  saharvest.org:
    site_hosts:
    - canonical: saharvest.org
      redirects:
      - www.saharvest.org

The hosts file remains exactly the same

My question, before I break the sites, is should this work without any issues?
The permalinks will probably need to be updated?

There shouldn’t be any problems but yeah you’ll have to update permalinks in the database. You can use WP-CLI’s search & replace command for that.

Though I’d suggest trying this on development/staging first just to confirm the process.

edit: and backup your database before doing anything of this of course