ansible/ansible — pull request #3284 by madduck (2013-06-20 18:50:19+00:00)
Title: Add remove_other parameter to authorized_key module

If 'remove_other' is set to 'yes' in the parameters of an
authorized_key action, then the effect will be that the specified keys
shall replace *all* existing keys in the file.

This is useful if you want to ensure that only the specified keys can
log in. It defaults to 'no'.

Notes:

1. the diff is larger than needed because I tried to keep the spacing
proper.

2. there was a bit of refactoring, namely writekeys was being called
once for each new key. Now the changes are assembled in a set() and
written out only once at the end. I could see no reason why
writekeys should be called in every iteration.

Signed-off-by: martin f. krafft