Hi all, > On Thu, 28 May 2020 at 19:31, 'Mario Garcia' via Ansible Project > <[email protected]> wrote: > > > > I am working on it to provide you an use case.. but. > > > > is by any chance the authorizing_file modules sanitizing aka > > removing duplicates entries on the remote authorized_key file even > > if it was not in the key string passed to be removed > > No, there is no such sanitizing thing.
I just looked at the code (https://github.com/ansible-collections/ansible.posix/blob/master/plugins/modules/authorized_key.py). It does indeed remove duplicates. It puts all lines of authorized_keys into a dictionary, indexed by the actual key: https://github.com/ansible-collections/ansible.posix/blob/master/plugins/modules/authorized_key.py#L450-L461 The value in the dictionary contains more information so that the file can be rebuilt - except that duplicate keys won't survive. It's probably a good idea to mention that in the module docs. If someone wants to create a PR for that (it's a good start to trying PRs for collections!), feel free! Cheers, Felix -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/20200528215146.4840da92%40rovaniemi.
