diff --git a/roles/bootstrap-os/tasks/main.yml b/roles/bootstrap-os/tasks/main.yml
index f2d441ad544e2be5cfbdc289ef160f28e20db450..89622f2f21851dc7b1109460b9f97b5a315575d0 100644
--- a/roles/bootstrap-os/tasks/main.yml
+++ b/roles/bootstrap-os/tasks/main.yml
@@ -65,7 +65,6 @@
   command: "hostnamectl set-hostname  {{inventory_hostname}}"
   register: hostname_changed
   when:
-    - ansible_hostname == 'localhost'
     - ansible_distribution in ['openSUSE Tumbleweed'] or ansible_os_family in ['CoreOS', 'Container Linux by CoreOS']
     - override_system_hostname