What version of Ansible are you using? For me authorized_keys module only
adds new keys, it doesn't replace them, so that shouldn't happen, even
though I would like to have an option to remove all previouse keys before
adding new ones.
On Saturday, February 22, 2014 2:39:57 PM UTC+1, Yaniv Ferszt wrote:
>
> even if i try it with this code
>
>
>
>
>
>
>
>
>
>
> *---- name: "Set up authorized_keys for the root user" hosts: laptop
> user: root tasks: - name: Set up user-a authorized_keys for the root
> user authorized_key: user=root key="{{ lookup('file',
> '/home/yaniv/playbooks/public-keys/user-a') }}" state=present - name: Set
> up user-b authorized_keys for the root user authorized_key: user=root
> key="{{ lookup('file', '/home/yaniv/playbooks/public-keys/user-b') }}"
> state=present*
>
>
> it will add user-a public key and then replace it with user-b public key.
> should this happen?
>
>
>
--
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/2612819b-3b30-4346-9a02-41123c042dce%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.