ansible/ansible — pull request #5107 by maetthu (2013-11-30 08:33:38+00:00)
Title: authorized_key module: rewrite options to dict parser, fixes #5032

Fixes parsing of key options in authorized_key module for all documented types of options: key only (e.g. no-agent-forwarding), key="value" (e.g. from="x,y,z", environment="X=Y,Z=42" and handles \" escapes in value, which is permitted according to authorized_keys man-page (and openssh source code). See #5032 for further info.

Exits with module.fail_json if parsing of options did not succeed, which is a safer way IMHO, as writing a key with invalid options leads to authentication failure, which would go unnoticed until trying to connect with the corresponding key (which happened in my case).