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

2020-05-28 Thread Dick Visser
Hard to tell what is going on without more information. * What do the keys that are being removed look like? * What does /path/to/totpubkey.pub look like? * What do the authorized_keys file(s) look like? Could it be that the same pubkey is listed in your authorized_keys several times but with

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

2020-05-28 Thread 'Mario Garcia' via Ansible Project
Hello I need to clean up a bit the authorized keys files on our infra i created a simple palybook that goes and removed one key from the remote authorized_keys files but when I run it in check/diff mode i see it tried to remove far too many lines this is the playbook --- - hosts: all

Re: [ansible-project] authorized_keys module

2019-02-06 Thread Dick Visser
Could it be that the key value has to start with the type of the key? I.e. "ssh-rsa" ? On Wed, 6 Feb 2019 at 20:11, 'Chris Bidwell - NOAA Federal' via Ansible Project wrote: > > Hi all, > > I'm trying to add pubkeys to several users and I'm getting an error message. > Here's the playbook: > >

Re: [ansible-project] authorized_keys module

2019-02-06 Thread Kai Stian Olstad
On 06.02.2019 20:11, 'Chris Bidwell - NOAA Federal' via Ansible Project wrote: Hi all, I'm trying to add pubkeys to several users and I'm getting an error message. Here's the playbook: --- - name: Add users and pubkeys hosts: server1 become: yes vars_files: - passwd.yml -

[ansible-project] authorized_keys module

2019-02-06 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hi all, I'm trying to add pubkeys to several users and I'm getting an error message. Here's the playbook: --- - name: Add users and pubkeys hosts: server1 become: yes vars_files: - passwd.yml - vars.yml tasks: - name: "Add users to gong server" user: name: "{{