ansible-role-users icon indicating copy to clipboard operation
ansible-role-users copied to clipboard

Add the `exclusive` parameter

Open jkirk opened this issue 9 months ago • 0 comments

Proposed feature

Please add the exclusive parameter:

Quoting ansible.posix.authorized_key module:

exclusive (boolean):

  Whether to remove all other non-specified keys from the authorized_keys
  file.

  Multiple keys can be specified in a single key string value by
  separating them by newlines.

  This option is not loop aware, so if you use with_ , it will be
  exclusive per iteration of the loop.

  If you want multiple keys in the file you need to pass them all to key
  in a single batch as mentioned above.

  Choices:

  * false (default)
  * true

Rationale

It makes sense to remove other non-specified keys from the authorized_keys file.

Thanks for your work and roles!

jkirk avatar Mar 25 '25 13:03 jkirk