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

Commit 8f44b6e

Browse files
authored
Merge pull request #234 from gobind-singh/version_comparison
changed string comparison to version comparison
2 parents 2b7201a + b25d9ea commit 8f44b6e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

tasks/crypto.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,60 +3,60 @@
33
- name: set hostkeys according to openssh-version
44
set_fact:
55
ssh_host_key_files: ['/etc/ssh/ssh_host_rsa_key', '/etc/ssh/ssh_host_ecdsa_key', '/etc/ssh/ssh_host_ed25519_key']
6-
when: sshd_version.stdout >= '6.3' and not ssh_host_key_files
6+
when: sshd_version.stdout is version('6.3', '>=') and not ssh_host_key_files
77

88
- name: set hostkeys according to openssh-version
99
set_fact:
1010
ssh_host_key_files: ['/etc/ssh/ssh_host_rsa_key', '/etc/ssh/ssh_host_ecdsa_key']
11-
when: sshd_version.stdout >= '6.0' and not ssh_host_key_files
11+
when: sshd_version.stdout is version('6.0', '>=') and not ssh_host_key_files
1212

1313
- name: set hostkeys according to openssh-version
1414
set_fact:
1515
ssh_host_key_files: ['/etc/ssh/ssh_host_rsa_key']
16-
when: sshd_version.stdout >= '5.3' and not ssh_host_key_files
16+
when: sshd_version.stdout is version('5.3', '>=') and not ssh_host_key_files
1717

1818
###
1919

2020
- name: set macs according to openssh-version if openssh >= 7.6
2121
set_fact:
2222
ssh_macs: '{{ ssh_macs_76_default }}'
23-
when: sshd_version.stdout >= '7.6' and not ssh_macs
23+
when: sshd_version.stdout is version('7.6', '>=') and not ssh_macs
2424

2525
- name: set macs according to openssh-version if openssh >= 6.6
2626
set_fact:
2727
ssh_macs: '{{ ssh_macs_66_default }}'
28-
when: sshd_version.stdout >= '6.6' and not ssh_macs
28+
when: sshd_version.stdout is version('6.6', '>=') and not ssh_macs
2929

3030
- name: set macs according to openssh-version
3131
set_fact:
3232
ssh_macs: '{{ ssh_macs_59_default }}'
33-
when: sshd_version.stdout >= '5.9' and not ssh_macs
33+
when: sshd_version.stdout is version('5.9', '>=') and not ssh_macs
3434

3535
- name: set macs according to openssh-version
3636
set_fact:
3737
ssh_macs: '{{ ssh_macs_53_default }}'
38-
when: sshd_version.stdout >= '5.3' and not ssh_macs
38+
when: sshd_version.stdout is version('5.3', '>=') and not ssh_macs
3939

4040
###
4141

4242
- name: set ciphers according to openssh-version if openssh >= 6.6
4343
set_fact:
4444
ssh_ciphers: '{{ ssh_ciphers_66_default }}'
45-
when: sshd_version.stdout >= '6.6' and not ssh_ciphers
45+
when: sshd_version.stdout is version('6.6', '>=') and not ssh_ciphers
4646

4747
- name: set ciphers according to openssh-version
4848
set_fact:
4949
ssh_ciphers: '{{ ssh_ciphers_53_default }}'
50-
when: sshd_version.stdout >= '5.3' and not ssh_ciphers
50+
when: sshd_version.stdout is version('5.3', '>=') and not ssh_ciphers
5151

5252
###
5353

5454
- name: set kex according to openssh-version if openssh >= 6.6
5555
set_fact:
5656
ssh_kex: '{{ ssh_kex_66_default }}'
57-
when: sshd_version.stdout >= '6.6' and not ssh_kex
57+
when: sshd_version.stdout is version('6.6', '>=') and not ssh_kex
5858

5959
- name: set kex according to openssh-version
6060
set_fact:
6161
ssh_kex: '{{ ssh_kex_59_default }}'
62-
when: sshd_version.stdout >= '5.9' and not ssh_kex
62+
when: sshd_version.stdout is version('5.9', '>=') and not ssh_kex

0 commit comments

Comments
 (0)