forked from dev-sec/ansible-collection-hardening
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add var ssh_host_keys_dir, for OSes with alternate host key locations
Signed-off-by: Alex Waite <[email protected]>
- Loading branch information
Showing
10 changed files
with
18 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
--- | ||
- name: set hostkeys according to openssh-version if openssh >= 5.3 | ||
set_fact: | ||
ssh_host_key_files: ['/etc/ssh/ssh_host_rsa_key'] | ||
ssh_host_key_files: | ||
- "{{ ssh_host_keys_dir }}/ssh_host_rsa_key" | ||
when: sshd_version is version('5.3', '>=') | ||
|
||
- name: set hostkeys according to openssh-version if openssh >= 6.0 | ||
set_fact: | ||
ssh_host_key_files: ['/etc/ssh/ssh_host_rsa_key', '/etc/ssh/ssh_host_ecdsa_key'] | ||
ssh_host_key_files: | ||
- "{{ ssh_host_keys_dir }}/ssh_host_rsa_key" | ||
- "{{ ssh_host_keys_dir }}/ssh_host_ecdsa_key" | ||
when: sshd_version is version('6.0', '>=') | ||
|
||
- name: set hostkeys according to openssh-version if openssh >= 6.3 | ||
set_fact: | ||
ssh_host_key_files: ['/etc/ssh/ssh_host_rsa_key', '/etc/ssh/ssh_host_ecdsa_key', '/etc/ssh/ssh_host_ed25519_key'] | ||
ssh_host_key_files: | ||
- "{{ ssh_host_keys_dir }}/ssh_host_rsa_key" | ||
- "{{ ssh_host_keys_dir }}/ssh_host_ecdsa_key" | ||
- "{{ ssh_host_keys_dir }}/ssh_host_ed25519_key" | ||
when: sshd_version is version('6.3', '>=') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
--- | ||
sshd_path: /usr/sbin/sshd | ||
ssh_host_keys_dir: '/etc/ssh' | ||
sshd_service_name: sshd | ||
ssh_owner: root | ||
ssh_group: wheel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters