Add exclusive option to authorized_keys#7680
Conversation
This option allows the module to ensure that ONLY the specified keys exist in the authorized_keys file. All others will be removed. This is quite useful when rotating keys and ensuring no other key will be accepted.
|
I have seen a number of people ask for this functionality, which seems to give this more merit. To play devils advocate for a moment, this could be achieved using the template or copy module also. However, with that being said, most people will look to this module due to it's name (of course) to provide authorized keys functionality. |
|
Yes, we're currently using a template/copy, but it's not as clean, and requires some awkward motions to add a new key to an existing file and testing it before removing any old keys from the file. |
|
Hi! Thanks very much for your interest in Ansible. It sincerely means a lot to us. On September 26, 2014, due to enormous levels of contribution to the project Ansible decided to reorganize module repos, making it easier We split modules from the main project off into two repos, http://github.com/ansible/ansible-modules-core and http://github.com/ansible/ansible-modules-extras If you still would like this pull request merged, we will need your help making this target the new repo. If you do not take any action, this We apologize that we are not able to make this transition happen seamlessly, though this is a one-time change and your help is greatly appreciated -- Both sets of modules will ship with Ansible, though they'll receive slightly different ticket handling. To locate where a module lives between 'core' and 'extras'
Otherwise, if this is a new module:
It may be possible to re-patriate your pull requests automatically, one user-submitted approach for advanced git users Additionally, should you need more help with this, you can ask questions on:
Thanks you very much! |
|
@j2sol Hi there... are you planning on creating a pull request for this at https://github.com/ansible/ansible-modules-extras/ ? It's a feature that I'm quite looking forward to :-) |
|
@j2sol Yes, it would be awesome, but I think that the right repo would be https://github.com/ansible/ansible-modules-core |
|
locking this thread as the feature is being added elsewhere, as linked above |
This option allows the module to ensure that ONLY the specified keys
exist in the authorized_keys file. All others will be removed. This is
quite useful when rotating keys and ensuring no other key will be
accepted.