1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

fix logic in module host to add aliases even if none exist already, fix #4563

self._has_aliases is used to know if a alias already exist, but
the test we want is to know if we need to add a new alias, which
is stored in self.aliases
This commit is contained in:
Michael Scherer 2013-10-19 01:51:42 +02:00
parent 1d090b5b25
commit d5c290b513

View file

@ -124,7 +124,7 @@ class Host(object):
break break
def full_entry_exists(self): def full_entry_exists(self):
if self._has_aliases and not self._aliases_matches: if self.aliases and not self._aliases_matches:
return False return False
return self._ip_matches and self._hostname_matches return self._ip_matches and self._hostname_matches