Re: [ansible-project] Re: authorized_keys module is deleting too many line when using state: absent

2020-05-28 Thread Dan Idar
I ran some tests created on vagrant some ssh files and created a authorized_keys with duplicates and tried to add/remove a line that is not a duplicate the result is that if there is a line to be added/removed from the authorized_keys files the duplicates are also removed if there are no

Re: [ansible-project] Re: authorized_keys module is deleting too many line when using state: absent

2020-05-28 Thread 'Felix Fontein' via Ansible Project
Hi all, > On Thu, 28 May 2020 at 19:31, 'Mario Garcia' via Ansible Project > 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

Re: [ansible-project] Re: authorized_keys module is deleting too many line when using state: absent

2020-05-28 Thread Dick Visser
On Thu, 28 May 2020 at 19:31, 'Mario Garcia' via Ansible Project 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

Re: [ansible-project] Re: authorized_keys module is deleting too many line when using state: absent

2020-05-28 Thread 'Mario Garcia' via Ansible Project
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 in that case there is probably no issue i must do some

Re: [ansible-project] Re: authorized_keys module is deleting too many line when using state: absent

2020-05-28 Thread Dick Visser
You could try and anonymize the usernames and comments and if that has the same problems, post that file. Then you'd be only posting public keys but no user names etc? On Thu, 28 May 2020 at 18:01, Dick Visser wrote: > The fact that multiple keys begin with B3NzaC1yc2E is because >

Re: [ansible-project] Re: authorized_keys module is deleting too many line when using state: absent

2020-05-28 Thread Dick Visser
The fact that multiple keys begin with B3NzaC1yc2E is because they share the same header - this is OK. The module takes the entire key string into account. Can you maybe reproduce this in a way that we can look at it? Otherwise it will be impossible to tell what is wrong (other that

[ansible-project] Re: authorized_keys module is deleting too many line when using state: absent

2020-05-28 Thread 'Mario Garcia' via Ansible Project
Hello no the key are differents but i think that ansible modules only match the beginning of the line but not the whole file i am not going to list all the public keys here but: the public key that has to be removed and the ones that are wrongly being removed have the 'same' beginning::