diff --git a/states/apt/apt.py.j2 b/states/apt/apt.py.j2 index febece1..1b8d029 100755 --- a/states/apt/apt.py.j2 +++ b/states/apt/apt.py.j2 @@ -10,7 +10,7 @@ PORT = "{{ apt.proxy.port }}" def main(): regex = re.compile(f".*{HOSTNAME}.*") - cmd = subprocess.Popen(f"avahi-resolve-host-name {HOSTNAME}", + cmd = subprocess.Popen(f"getent hosts {HOSTNAME}", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)