Remove boolean comparison and regenerate templates

This commit is contained in:
Jakub Jelen 2021-05-21 17:57:24 +02:00 committed by Jakub Jelen
parent 8e180cfb48
commit 3e9d408015
3 changed files with 6 additions and 6 deletions

View file

@ -1,6 +1,6 @@
{% macro render_option(key,value,indent=false) %} {% macro render_option(key,value,indent=false) %}
{% if value is defined %} {% if value is defined %}
{% if indent == true %} {% endif %} {% if indent %} {% endif %}
{% if value is sameas true %} {% if value is sameas true %}
{{ key }} yes {{ key }} yes
{% elif value is sameas false %} {% elif value is sameas false %}
@ -20,7 +20,7 @@
{% set value = override %} {% set value = override %}
{% elif sshd[key] is defined %} {% elif sshd[key] is defined %}
{% set value = sshd[key] %} {% set value = sshd[key] %}
{% elif __sshd_defaults[key] is defined and sshd_skip_defaults != true %} {% elif __sshd_defaults[key] is defined and not sshd_skip_defaults %}
{% set value = __sshd_defaults[key] %} {% set value = __sshd_defaults[key] %}
{% endif %} {% endif %}
{{ render_option(key,value) -}} {{ render_option(key,value) -}}

View file

@ -1,7 +1,7 @@
# {{ ansible_managed }} # {{ ansible_managed }}
{% macro render_option(key,value,indent=false) %} {% macro render_option(key,value,indent=false) %}
{% if value is defined %} {% if value is defined %}
{% if indent == true %} {% endif %} {% if indent %} {% endif %}
{% if value is sameas true %} {% if value is sameas true %}
{{ key }} yes {{ key }} yes
{% elif value is sameas false %} {% elif value is sameas false %}
@ -21,7 +21,7 @@
{% set value = override %} {% set value = override %}
{% elif sshd[key] is defined %} {% elif sshd[key] is defined %}
{% set value = sshd[key] %} {% set value = sshd[key] %}
{% elif __sshd_defaults[key] is defined and sshd_skip_defaults != true %} {% elif __sshd_defaults[key] is defined and not sshd_skip_defaults %}
{% set value = __sshd_defaults[key] %} {% set value = __sshd_defaults[key] %}
{% endif %} {% endif %}
{{ render_option(key,value) -}} {{ render_option(key,value) -}}

View file

@ -1,6 +1,6 @@
{% macro render_option(key,value,indent=true) %} {% macro render_option(key,value,indent=true) %}
{% if value is defined %} {% if value is defined %}
{% if indent == true %} {% endif %} {% if indent %} {% endif %}
{% if value is sameas true %} {% if value is sameas true %}
{{ key }} yes {{ key }} yes
{% elif value is sameas false %} {% elif value is sameas false %}
@ -20,7 +20,7 @@
{% set value = override %} {% set value = override %}
{% elif sshd[key] is defined %} {% elif sshd[key] is defined %}
{% set value = sshd[key] %} {% set value = sshd[key] %}
{% elif __sshd_defaults[key] is defined and sshd_skip_defaults != true %} {% elif __sshd_defaults[key] is defined and not sshd_skip_defaults %}
{% set value = __sshd_defaults[key] %} {% set value = __sshd_defaults[key] %}
{% endif %} {% endif %}
{{ render_option(key,value) -}} {{ render_option(key,value) -}}