Pārlūkot izejas kodu

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.
tags/v1.2.2
Daniel Dehennin pirms 4 gadiem
vecāks
revīzija
b2d38aec9b
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. +1
    -1
      openssh/files/default/ssh_known_hosts

+ 1
- 1
openssh/files/default/ssh_known_hosts Parādīt failu

@@ -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 %}

Notiek ielāde…
Atcelt
Saglabāt