Michael,

Done: https://github.com/ansible/ansible/issues/5227


In the meantime I will stick to flat files, as it seems to happen only when 
using it with templates, although the way I understand it, it should work 
exactly the same way.

On Sunday, 8 December 2013 18:15:41 UTC+1, Michael DeHaan wrote:
>
> That's definitely confusing, I agree, we should work to make this better.
>
> Can you please file a ticket on GitHub so we can investigate?
>
> Please include the output of "ansible --version" in the report.
>
> Thanks!
>
>
> On Sun, Dec 8, 2013 at 12:03 PM, Guillem Liarte 
> <[email protected]<javascript:>
> > wrote:
>
>> Hello.
>>
>> I try to use this:
>>
>>
>> http://www.ansibleworks.com/docs/playbooks_conditionals.html#selecting-files-and-templates-based-on-variables
>>
>> /etc/ansible/roles/common/templates# ls -lrt *some*
>> -rw-------. 1 root root 750 Dec  6 11:49 hos1.some.conf.j2
>> -rw-r--r--. 1 root root 700 Dec  6 12:06 some.conf.j2
>>
>>
>> - name: Make sure configuration is correct.
>>   template: src={{ item }} dest=/etc/some.conf
>>   with_first_found:
>>     files:
>>        - ${ansible_hostname}.some.conf.j2
>>        - some.conf.j2
>>     paths:
>>        - ../templates
>>        - ../files
>>   tags:
>>     - common
>>     - auth
>>
>>
>> When I run:
>>
>> TASK: [Make sure configuration is correct.] 
>> ****************************** 
>> fatal: [host1] => input file not found at 
>> /etc/ansible/roles/common/templates/None or /etc/ansible/None
>>
>>
>> FATAL: all hosts have already failed -- aborting
>>
>> So, the files exist, both the especific and the default. The pattern is 
>> as per given example.
>>
>> I am succesfully distributing files from /etc/ansible/roles/common/files 
>> and templates /etc/ansible/roles/common/templates, that is not the issue. I 
>> tried specifying only templates is path, and also nothing. 
>>
>> If I change the actions to copy, it would work, but it would not be used 
>> as a template.
>>
>> What am I missing here?
>>
>> Many thanks in advance.
>>
>> -- 
>> 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] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
> Michael DeHaan <[email protected] <javascript:>>
> CTO, AnsibleWorks, Inc.
> http://www.ansibleworks.com/
>
>  

-- 
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].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to