If you set contacts/contactgroups at the host/service level it will override any settings you have defined at the template level (with the default setting of Standard). So if they already have contactgroups assigned at the host/service level (instead at template level) modifying the template will NOT override the settings of the hosts/services that use that template because the locally defined settings (directly on host/service) take priority. If the host/service does NOT have contactgroups assigned to them then it should inherit them from the templates.
That can be adjusted though by selecting +, Null, or Standard when selecting the contacts/contactgroups. (+ means additive, null means don't inherit, standard (the default) means it will inherit)
So if you add contactgroups at the templates level and choose +, then add contactgroups to the host/service level and choose the + there too then it will be additive (meaning the contactgroups from the template AND the locally defined contactgroups would be added together so both would get them).
But there isn't a way to say don't use the contacts/contactgroups defined on the host/service and only pull from the templates.
What you could do is setup escalations (one host escalation, one service escalation):
For the host escalation, choose * for hosts, start 1, end 0, select all the escalation options, set the timeperiod to 24x7 (of something custom you define), set the contacts/contactgroups. That will change all hosts to use that new escalation while that escalation exists.
For the service escalation, choose * for hosts, choose * for services, start 1, end 0, select all the escalation options, set the timeperiod to 24x7 (of something custom you define), set the contacts/contactgroups. That will change all service to use that new escalation while that escalation exists.
Then once you come back you can delete the escalations (or if you define your own custom timeperiod and use that when creating the escalation it will exit it automatically.
See here for referece:
https://assets.nagios.com/downloads/nag ... ations.pdf
https://assets.nagios.com/downloads/nag ... riods.html
Let us know if you have any questions.