This is the output of the whole test:
➜ Ansible cat test.yml
---
- hosts: localhost
gather_facts: no
vars:
- my_list: [1,2,3,4]
tasks:
- name: TEMPLATE
template: dest=/home/Ansible/dest.y src=src.j2
➜ Ansible ansible-playbook test.yml
PLAY [localhost]
**************************************************************
TASK: [TEMPLATE]
**************************************************************
failed: [localhost] => {"failed": true}
msg: missing required arguments: dest
FATAL: all hosts have already failed -- aborting
PLAY RECAP
********************************************************************
to retry, use: --limit @/home/test.retry
localhost : ok=0 changed=0 unreachable=0 failed=1
Thanks.
On Friday, April 8, 2016 at 10:49:53 AM UTC-4, Roger Gomez wrote:
>
> Hi J Hawkesworth, thanks for taking the time to answer my question. I did
> try before both of your suggestions and the same error, I have multiple
> Ansible machine and only in this one does not work. Is basically ignoring
> the *dest* argument, definitely the output of the error is not correct.
> My inventory is pretty simple, I actually found this issue trying to do
> something else so I create this small test to narrow down the problem.
> Thanks.
>
> On Friday, April 8, 2016 at 6:02:10 AM UTC-4, J Hawkesworth wrote:
>>
>> Hi
>>
>> Not sure exactly but it looks like you're mixing key=value args and yaml
>> styl args. Try the following
>>
>> ---
>> - hosts: all
>> gather_facts: no
>> vars:
>> - my_list: [1,2,3,4]
>> tasks:
>> - name: TEMPLATE
>> template:
>> dest: /home/Ansible/dest.y
>> src: src.j2
>>
>> Or
>>
>> ---
>> - hosts: all
>> gather_facts: no
>> vars:
>> - my_list: [1,2,3,4]
>> tasks:
>> - name: TEMPLATE
>> template: dest=/home/Ansible/dest.y src=src.j2
>>
>>
>> On Thursday, April 7, 2016 at 11:39:43 PM UTC+1, Roger Gomez wrote:
>>>
>>> I have this very simple playbook
>>> ---
>>> - hosts:
>>> - all
>>> gather_facts: no
>>> vars:
>>> - my_list: [1,2,3,4]
>>> tasks:
>>> - name: TEMPLATE
>>> template:
>>> dest='/home/Ansible/dest.y'
>>> src='src.j2'
>>>
>>> And when I run the playbook I got:
>>> failed: [HOST-A] => {"failed": true}
>>> msg: missing required arguments: dest
>>>
>>>
>>> Any idea?
>>> Thanks.
>>>
>>>
--
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/1b92a13c-124c-4d05-b8d9-786cf60d9137%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.