From b2d38aec9bd46a64965be0ecb66e7c912a1bf3c6 Mon Sep 17 00:00:00 2001 From: Daniel Dehennin Date: Thu, 30 Jul 2020 12:25:34 +0200 Subject: [PATCH] fix(jinja): omit_ip_address don't work on some platform It apprears that the `if not (omit_ip_address is sameas true or host in omit_ip_address)` always returns `True` on older Jinja platforms: - default-ubuntu-1604-3000-3-py2 - default-ubuntu-1604-2019-2-py3 - default-amazonlinux-1-2019-2-py2 Each part of the `or` conditional need to be surrounded by parenthesis. --- openssh/files/default/ssh_known_hosts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openssh/files/default/ssh_known_hosts b/openssh/files/default/ssh_known_hosts index 0e76060..ef6b720 100644 --- a/openssh/files/default/ssh_known_hosts +++ b/openssh/files/default/ssh_known_hosts @@ -6,7 +6,7 @@ {%- macro known_host_entry(host, host_names, keys, include_localhost, omit_ip_address) %} {#- Get IPv4 and IPv6 addresses from the DNS #} -{%- if not (omit_ip_address is sameas true or host in omit_ip_address) %} +{%- if not ((omit_ip_address is sameas true) or (host in omit_ip_address)) %} {%- set ip4 = salt['dig.A'](host) -%} {%- set ip6 = salt['dig.AAAA'](host) -%} {%- else %}