Add SSH-Version and dynamic key information
This commit is contained in:
parent
b0f743cccc
commit
5e81102477
|
@ -23,6 +23,11 @@
|
||||||
- service_facts:
|
- service_facts:
|
||||||
ignore_errors: True
|
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
|
- name: write wiki page
|
||||||
local_action:
|
local_action:
|
||||||
module: template
|
module: template
|
||||||
|
|
|
@ -23,11 +23,9 @@ Mountpoints:
|
||||||
|
|
||||||
* AppArmor: {{ ansible_apparmor.status }}
|
* AppArmor: {{ ansible_apparmor.status }}
|
||||||
* SE-Linux: {{ ansible_selinux.status }}
|
* SE-Linux: {{ ansible_selinux.status }}
|
||||||
* SSH-Host-Keys:
|
* SSH Version {{ ssh_version.stdout_lines.0 }}:
|
||||||
* DSA: <code>{{ ansible_ssh_host_key_dsa_public|default("N/A") }}</code>
|
{% 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>
|
||||||
* RSA: <code>{{ ansible_ssh_host_key_rsa_public|default("N/A") }}</code>
|
{% endif %}{% endfor %}
|
||||||
* ECDSA: <code>{{ ansible_ssh_host_key_ecdsa_public|default("N/A") }}</code>
|
|
||||||
* Ed25519: <code>{{ ansible_ssh_host_key_ed25519_public|default("N/A") }}</code>
|
|
||||||
|
|
||||||
===== Packages =====
|
===== Packages =====
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue