saltstack/salt — pull request #990 by trane (2012-03-22 17:10:23+00:00)
Title: Error handle invalid keys, properly add/rm/replace/update existing keys

This fixes several things:

1. Fixed a bug where if the key had no spaces but had a comment, it would append the key on every run
2. Returns 'invalid' on a key with spaces, which is handled by the ssh_auth state
3. Includes the fix for options before the key