|
3 | 3 | - name: set hostkeys according to openssh-version
|
4 | 4 | set_fact:
|
5 | 5 | 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 |
7 | 7 |
|
8 | 8 | - name: set hostkeys according to openssh-version
|
9 | 9 | set_fact:
|
10 | 10 | 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 |
12 | 12 |
|
13 | 13 | - name: set hostkeys according to openssh-version
|
14 | 14 | set_fact:
|
15 | 15 | 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 |
17 | 17 |
|
18 | 18 | ###
|
19 | 19 |
|
20 | 20 | - name: set macs according to openssh-version if openssh >= 7.6
|
21 | 21 | set_fact:
|
22 | 22 | 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 |
24 | 24 |
|
25 | 25 | - name: set macs according to openssh-version if openssh >= 6.6
|
26 | 26 | set_fact:
|
27 | 27 | 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 |
29 | 29 |
|
30 | 30 | - name: set macs according to openssh-version
|
31 | 31 | set_fact:
|
32 | 32 | 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 |
34 | 34 |
|
35 | 35 | - name: set macs according to openssh-version
|
36 | 36 | set_fact:
|
37 | 37 | 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 |
39 | 39 |
|
40 | 40 | ###
|
41 | 41 |
|
42 | 42 | - name: set ciphers according to openssh-version if openssh >= 6.6
|
43 | 43 | set_fact:
|
44 | 44 | 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 |
46 | 46 |
|
47 | 47 | - name: set ciphers according to openssh-version
|
48 | 48 | set_fact:
|
49 | 49 | 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 |
51 | 51 |
|
52 | 52 | ###
|
53 | 53 |
|
54 | 54 | - name: set kex according to openssh-version if openssh >= 6.6
|
55 | 55 | set_fact:
|
56 | 56 | 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 |
58 | 58 |
|
59 | 59 | - name: set kex according to openssh-version
|
60 | 60 | set_fact:
|
61 | 61 | 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