diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-06-27 11:27:55 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-06-27 11:51:05 -0700 |
commit | 3a5482e8b436805172df321cce9ecccf94d13c13 (patch) | |
tree | ab94aa899906b31db2a8e4ecf4826c41c06ba6c9 /src/property/sshd.lisp | |
parent | bc851a03960a1f26b0dccf00adc70c75ba31d651 (diff) | |
download | consfigurator-3a5482e8b436805172df321cce9ecccf94d13c13.tar.gz |
SSH known host properties: add :IPS and :ADDITIONAL-NAMES parameters
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/property/sshd.lisp')
-rw-r--r-- | src/property/sshd.lisp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/property/sshd.lisp b/src/property/sshd.lisp index 96fe568..9fb6f2d 100644 --- a/src/property/sshd.lisp +++ b/src/property/sshd.lisp @@ -64,10 +64,14 @@ The private key is obtained as an item of prerequisite data." (file:host-secret-uploaded (merge-pathnames (strcat "ssh_host_" type "_key") #P"/etc/ssh/"))) -(defun get-host-public-keys (host &key short-hostname (aliases t)) +(defun get-host-public-keys (host &key short-hostname (aliases t) + (ips t) additional-names) (let* ((host (preprocess-host host)) (hostname (get-hostname host)) (short (and short-hostname (list (get-short-hostname host)))) - (aliases (and aliases (get-hostattrs :aliases host)))) - (cons (format nil "~{~A~^,~}" (cons hostname (append aliases short))) + (aliases (and aliases (get-hostattrs :aliases host))) + (ips (and ips (append (get-hostattrs :ipv6 host) + (get-hostattrs :ipv4 host))))) + (cons (format nil "~{~A~^,~}" + (cons hostname (append aliases short ips additional-names))) (mapcar #'cdr (get-hostattrs 'host-public-key host))))) |