yes, it’s necessary because the main change from 1.3.x to 1.4.x is firewall syntax, as I suggest , if you make an upgrade 1.3.8 to 1.4.1 using this process:
https://docs.vyos.io/en/equuleus/installation/update.html#example
After that, the migration script translates to the new syntax, which you can use in the Jinja template on Ansible.