@@ -74,7 +74,9 @@ StrictHostKeyChecking ask
7474 {% if (ansible_distribution == 'Ubuntu' and ansible_distribution_version >= '14.04' ) or (ansible_distribution == 'Debian' and ansible_distribution_version >= '8' ) or (ansible_os_family in ['Oracle Linux' , 'RedHat' ] and ansible_distribution_major_version >= '7' ) -%}
7575 MACs {{ ssh_macs_66_default | join(',') }}
7676 {% elif ansible_os_family in ['Oracle Linux' , 'RedHat' ] and ansible_distribution_major_version <= '6' -%}
77- MACs {{ ssh_macs_53_default | join(',') }}
77+ MACs {{ ssh_macs_53_default | join(',') }}
78+ {% else -%}
79+ MACs {{ ssh_macs_59_default | join(',') }}
7880 {% endif %}
7981{% endif %}
8082
@@ -85,14 +87,14 @@ StrictHostKeyChecking ask
8587# Weak kex is sometimes required if older package versions are used
8688# 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.
8789#
88- {% if (ansible_distribution == 'Ubuntu' and ansible_distribution_version >= '14.04' ) or (ansible_distribution == 'Debian' and ansible_distribution_version >= '8' ) -%}
90+ {% if (ansible_distribution == 'Ubuntu' and ansible_distribution_version >= '14.04' ) or (ansible_distribution == 'Debian' and ansible_distribution_version >= '8' ) or ( ansible_os_family in [ 'Oracle Linux' , 'RedHat' ] and ansible_distribution_major_version >= '7' ) -%}
8991 {% if ssh_client_weak_kex -%}
9092 KexAlgorithms {{ ssh_kex_66_weak | join(',') }}
9193 {% else -%}
9294 KexAlgorithms {{ ssh_kex_66_default | join(',') }}
9395 {% endif %}
9496{% else -%}
95- {% if ansible_os_family in ['Oracle Linux' , 'RedHat' ] -%}
97+ {% if ansible_os_family in ['Oracle Linux' , 'RedHat' ] and ansible_distribution_major_version <= '6' -%}
9698 #KexAlgorithms
9799 {% elif ssh_client_weak_kex -%}
98100 KexAlgorithms {{ ssh_kex_59_weak | join(',') }}
0 commit comments