diff --git a/lib/ansible/modules/hostname.py b/lib/ansible/modules/hostname.py index 681d63c508e..7fe04ad82d8 100644 --- a/lib/ansible/modules/hostname.py +++ b/lib/ansible/modules/hostname.py @@ -886,8 +886,6 @@ def main(): if name != current_hostname: name_before = current_hostname - elif name != permanent_hostname: - name_before = permanent_hostname else: name_before = permanent_hostname