Skip to content
This repository was archived by the owner on Dec 26, 2020. It is now read-only.

Commit a09eb51

Browse files
author
Sebastian Gumprich
committed
add parantheses
1 parent 0d62d41 commit a09eb51

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

templates/openssh.conf.j2

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# ===================
1010

1111
# Address family should always be limited to the active network configuration.
12-
AddressFamily {{ 'any' if network_ipv6_enable else 'inet' }}
12+
AddressFamily {{ 'any' if network_ipv6_enable else 'inet' }}
1313
# Restrict the following configuration to be limited to this Host.
1414
{% for host in ssh_remote_hosts -%}
1515
Host {{host}}
@@ -47,13 +47,13 @@ StrictHostKeyChecking ask
4747
# -- see: (http://net-ssh.github.com/net-ssh/classes/Net/SSH/Transport/CipherFactory.html)
4848
#
4949
{% if ssh_client_cbc_required -%}
50-
{% if ansible_distribution == 'Ubuntu' and ansible_distribution_version >= '14.04' or (ansible_distribution == 'Debian' and ansible_distribution_version >= '8') -%}
50+
{% if (ansible_distribution == 'Ubuntu' and ansible_distribution_version >= '14.04') or (ansible_distribution == 'Debian' and ansible_distribution_version >= '8') -%}
5151
Ciphers {{ ssh_ciphers_66_weak | join(',') }}
5252
{% else -%}
5353
Ciphers {{ ssh_ciphers_53_weak | join(',') }}
5454
{% endif %}
5555
{% else -%}
56-
{% if ansible_distribution == 'Ubuntu' and ansible_distribution_version >= '14.04' or (ansible_distribution == 'Debian' and ansible_distribution_version >= '8') -%}
56+
{% if (ansible_distribution == 'Ubuntu' and ansible_distribution_version >= '14.04') or (ansible_distribution == 'Debian' and ansible_distribution_version >= '8') -%}
5757
Ciphers {{ ssh_ciphers_66_default | join(',') }}
5858
{% else -%}
5959
Ciphers {{ ssh_ciphers_53_default | join(',') }}
@@ -65,15 +65,15 @@ StrictHostKeyChecking ask
6565
# eg Ruby's Net::SSH at around 2.2.* doesn't support sha2 for hmac, so this will have to be set true in this case.
6666
#
6767
{% if ssh_client_weak_hmac -%}
68-
{% if ansible_distribution == 'Ubuntu' and ansible_distribution_version >= '14.04' or (ansible_distribution == 'Debian' and ansible_distribution_version >= '8') -%}
68+
{% if (ansible_distribution == 'Ubuntu' and ansible_distribution_version >= '14.04') or (ansible_distribution == 'Debian' and ansible_distribution_version >= '8') -%}
6969
MACs {{ ssh_macs_66_weak | join(',') }}
7070
{% elif ansible_os_family in ['Oracle Linux', 'RedHat'] and ansible_distribution_major_version <= '6' -%}
7171
MACs {{ ssh_macs_53_default | join(',') }}
7272
{% else -%}
7373
MACs {{ ssh_macs_59_weak | join(',') }}
7474
{% endif %}
7575
{% else -%}
76-
{% if ansible_distribution == 'Ubuntu' and ansible_distribution_version >= '14.04' or (ansible_distribution == 'Debian' and ansible_distribution_version >= '8') -%}
76+
{% if (ansible_distribution == 'Ubuntu' and ansible_distribution_version >= '14.04') or (ansible_distribution == 'Debian' and ansible_distribution_version >= '8') -%}
7777
MACs {{ ssh_macs_66_default | join(',') }}
7878
{% elif ansible_os_family in ['Oracle Linux', 'RedHat'] and ansible_distribution_major_version <= '6' -%}
7979
MACs {{ ssh_macs_53_default | join(',') }}
@@ -89,7 +89,7 @@ StrictHostKeyChecking ask
8989
# Weak kex is sometimes required if older package versions are used
9090
# eg ruby's Net::SSH at around 2.2.* doesn't support sha2 for kex, so this will have to be set true in this case.
9191
#
92-
{% if ansible_distribution == 'Ubuntu' and ansible_distribution_version >= '14.04' or (ansible_distribution == 'Debian' and ansible_distribution_version >= '8') -%}
92+
{% if (ansible_distribution == 'Ubuntu' and ansible_distribution_version >= '14.04') or (ansible_distribution == 'Debian' and ansible_distribution_version >= '8') -%}
9393
{% if ssh_client_weak_kex -%}
9494
KexAlgorithms {{ ssh_kex_66_weak | join(',') }}
9595
{% else -%}

templates/opensshd.conf.j2

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ LogLevel VERBOSE
5151
# -- see: (http://net-ssh.github.com/net-ssh/classes/Net/SSH/Transport/CipherFactory.html)
5252
#
5353
{% if ssh_server_cbc_required -%}
54-
{% if ansible_distribution == 'Ubuntu' and ansible_distribution_version >= '14.04' or (ansible_distribution == 'Debian' and ansible_distribution_version >= '8') -%}
54+
{% if (ansible_distribution == 'Ubuntu' and ansible_distribution_version >= '14.04') or (ansible_distribution == 'Debian' and ansible_distribution_version >= '8') -%}
5555
Ciphers {{ ssh_ciphers_66_weak | join(',') }}
5656
{% else %}
5757
Ciphers {{ ssh_ciphers_53_weak | join(',') }}
5858
{% endif %}
5959
{% else -%}
60-
{% if ansible_distribution == 'Ubuntu' and ansible_distribution_version >= '14.04' or (ansible_distribution == 'Debian' and ansible_distribution_version >= '8') -%}
60+
{% if (ansible_distribution == 'Ubuntu' and ansible_distribution_version >= '14.04') or (ansible_distribution == 'Debian' and ansible_distribution_version >= '8') -%}
6161
Ciphers {{ ssh_ciphers_66_default | join(',') }}
6262
{% else -%}
6363
Ciphers {{ ssh_ciphers_53_default | join(',') }}
@@ -70,7 +70,7 @@ LogLevel VERBOSE
7070
#
7171

7272
{% if ssh_server_weak_hmac -%}
73-
{% if ansible_distribution == 'Ubuntu' and ansible_distribution_version >= '14.04' or (ansible_distribution == 'Debian' and ansible_distribution_version >= '8') -%}
73+
{% if (ansible_distribution == 'Ubuntu' and ansible_distribution_version >= '14.04') or (ansible_distribution == 'Debian' and ansible_distribution_version >= '8') -%}
7474
MACs {{ ssh_macs_66_weak | join(',') }}
7575
{% elif ansible_os_family in ['Oracle Linux', 'RedHat'] and ansible_distribution_major_version <= '6' -%}
7676
MACs {{ ssh_macs_53_default | join(',') }}
@@ -94,7 +94,7 @@ LogLevel VERBOSE
9494
# Weak kex is sometimes required if older package versions are used
9595
# eg ruby's Net::SSH at around 2.2.* doesn't support sha2 for kex, so this will have to be set true in this case.
9696
# based on: https://bettercrypto.org/static/applied-crypto-hardening.pdf
97-
{% if ansible_distribution == 'Ubuntu' and ansible_distribution_version >= '14.04' or (ansible_distribution == 'Debian' and ansible_distribution_version >= '8') -%}
97+
{% if (ansible_distribution == 'Ubuntu' and ansible_distribution_version >= '14.04') or (ansible_distribution == 'Debian' and ansible_distribution_version >= '8') -%}
9898
{% if ssh_server_weak_kex -%}
9999
KexAlgorithms {{ ssh_kex_66_weak | join(',') }}
100100
{% else -%}

0 commit comments

Comments
 (0)