diff --git a/geant/gap_ansible/roles/iptrunk_migration/tasks/main.yml b/geant/gap_ansible/roles/iptrunk_migration/tasks/main.yml
index 2d3c1b95f26803cc5fb4ec5472210978baa451df..67c71a7c5c477d2b82b512e8a3855e750f8de9dc 100644
--- a/geant/gap_ansible/roles/iptrunk_migration/tasks/main.yml
+++ b/geant/gap_ansible/roles/iptrunk_migration/tasks/main.yml
@@ -57,15 +57,15 @@
 - name: Include compiling the template for the old node
   ansible.builtin.include_tasks: compile_template.yaml
   when: (verb == "deactivate" or verb == "delete")
-        and inventory_hostname == old_node
+        and inventory_hostname == old_node.fqdn
 
 - name: Include deactivation tasks for the old node
   ansible.builtin.include_tasks: deactivate_trunk_side.yaml
-  when: verb == "deactivate" and inventory_hostname == old_node
+  when: verb == "deactivate" and inventory_hostname == old_node.fqdn
 
 - name: Include removal tasks for the old node
   ansible.builtin.include_tasks: delete_trunk_side.yaml
-  when: verb == "delete" and inventory_hostname == old_node
+  when: verb == "delete" and inventory_hostname == old_node.fqdn
 
 - name: Include compiling the template for the new node
   ansible.builtin.include_tasks: compile_template.yaml