authorized_key seems to look in ./ssh
have you tried to import your file in vars_files?

Le jeudi 23 juillet 2015 14:06:47 UTC+1, [email protected] a 
écrit :
>
> Hi,
>
> I'm trying to add an ssh key to all my servers via the authorized_keys 
> command but it doesn't seem to look in the usual places (i.e the role 
> directory(s)). Here's my code
>
> - name: Install SSH keys
>   authorized_key: user=vagrant key="{{ item }}"
>   with_file:
>     - id_rsa.pub
>
> Enter code here...
>
> And my directory structure is:
>
> /-roles
> /-- disco
> /---- files
> /----- id_rsa.pub
> /---- tasks
> /----- main.yml
> /- disco.yml
>
> And the error on the terminal (with -vvvv):
>
> TASK: [disco | Install SSH keys] 
> ********************************************** 
> fatal: [default] => could not locate file in lookup: id_rsa.pub
>
> FATAL: all hosts have already failed -- aborting
>
> It seems that the authorized_keys does not look in the same folders as 
> 'copy', for example.
>
> Thanks
> James
>

-- 
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/71e934bf-1e32-4d32-8b32-1ed593d4057f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to