If the lookup file is not found, it *should* produce an exception, yes.

If you are seeing this behavior on the development branch, please make sure
there is a ticket on github.

(To be clear, this has nothing to do with the authorized key module in the
end, and everything to do with the lookup plugin)

Thanks!




On Sun, Apr 13, 2014 at 3:36 PM, Francisco Reyes <[email protected]>wrote:

> If the key file to read is not found, shouldn't the authorized_key module
> report an error?
>
> Have this in a playbook
> - name: Manage keys for users
>     authorized_key: user={{item.uname}}
> key="{{lookup('file','~/Ansible/keys/' + item.uname + '/authorized_keys2')
> }}"
>                     manage_dir=yes
>                      path='/home/{{item.uname}}/.ssh/authorized_keys2'
>     with_items: Ops
>
> I originally had the folder "Ansible" called something else. Upon rename
> keys stopped getting installed, but the module did not report an error.
>
> --
> 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/f33e8a28-d3e1-45c3-95c5-613e5140b35c%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/f33e8a28-d3e1-45c3-95c5-613e5140b35c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CA%2BnsWgwDJxMv8a4X8aviVwoiPOi%3Dq71LQPEDT7KtsGbDd3pn3A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to