From d188939b14073668e8c195b7155ce4543a8d5936 Mon Sep 17 00:00:00 2001 From: "C. R. Oldham" Date: Wed, 4 Dec 2013 13:07:15 -0700 Subject: [PATCH] Be more liberal about the format of the key we are looking for. (e.g. accept 'ssh-rsa AAB3NzaC... comment' as well as just 'AAB3NzaC...') --- salt/states/ssh_auth.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/salt/states/ssh_auth.py b/salt/states/ssh_auth.py index 31c25434e3..bc6a327b73 100644 --- a/salt/states/ssh_auth.py +++ b/salt/states/ssh_auth.py @@ -269,7 +269,11 @@ def absent(name, 'comment': ''} # Get just the key - name = name.split(' ')[0] + keydata = name.split(' ') + if len(keydata) > 1: + name = keydata[1] + else: + name = keydata[0] if __opts__['test']: check = __salt__['ssh.check_key'](