Add SSH-Version and dynamic key information
This commit is contained in:
parent
b0f743cccc
commit
5e81102477
|
@ -23,6 +23,11 @@
|
|||
- service_facts:
|
||||
ignore_errors: True
|
||||
|
||||
- name: Get SSH version number
|
||||
shell: 'ssh -V 2>&1 | grep -o "OpenSSH_[0-9]\+\.[0-9]" | grep -o "[0-9]\+\.[0-9]"'
|
||||
changed_when: False
|
||||
register: ssh_version
|
||||
|
||||
- name: write wiki page
|
||||
local_action:
|
||||
module: template
|
||||
|
|
|
@ -23,11 +23,9 @@ Mountpoints:
|
|||
|
||||
* AppArmor: {{ ansible_apparmor.status }}
|
||||
* SE-Linux: {{ ansible_selinux.status }}
|
||||
* SSH-Host-Keys:
|
||||
* DSA: <code>{{ ansible_ssh_host_key_dsa_public|default("N/A") }}</code>
|
||||
* RSA: <code>{{ ansible_ssh_host_key_rsa_public|default("N/A") }}</code>
|
||||
* ECDSA: <code>{{ ansible_ssh_host_key_ecdsa_public|default("N/A") }}</code>
|
||||
* Ed25519: <code>{{ ansible_ssh_host_key_ed25519_public|default("N/A") }}</code>
|
||||
* SSH Version {{ ssh_version.stdout_lines.0 }}:
|
||||
{% for method in ["dsa", "rsa", "ecdsa", "ed25519", "xmss"] %}{% if ansible_facts["ssh_host_key_" + method + "_public"] is defined %} * {{ method|upper }}: <code>{{ ansible_facts["ssh_host_key_" + method + "_public_keytype"]|default("") }} {{ ansible_facts["ssh_host_key_" + method + "_public"] }}</code>
|
||||
{% endif %}{% endfor %}
|
||||
|
||||
===== Packages =====
|
||||
|
||||
|
|
Loading…
Reference in a new issue