I still see the same error after correcting the indentation as shown below:

more roles/tor/tasks/main.yml
---
- name: Generate tor files
  template: src=tor.j2 dest="{{ item.hostname }}.txt"
  with_items:
    - hostname: nexus1
    - hostname: nexus2

++++++++++++++++++++
ansible-playbook site.yml 
ERROR! conflicting action statements

The error appears to have been in 
'/usr/share/ansible/NXS-TEMPLATE/roles/tor/tasks/main.yml': line 2, column 
3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

---
- name: Generate tor files
  ^ here


The error appears to have been in 
'/usr/share/ansible/NXS-TEMPLATE/roles/tor/tasks/main.yml': line 2, column 
3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

---
- name: Generate tor files
  ^ here

Please advise

Best,
GP


On Sunday, June 12, 2016 at 7:46:22 PM UTC-7, [email protected] wrote:
>
> Hi ,
> I am a newbie to the ansible world and struggling with some errors  I am 
> trying to create switch configs based on the following url:
>
> https://pynet.twb-tech.com/blog/ansible/ansible-cfg-template.html
>
> Whenever, I am running my yaml file, I see the following error:
>
> ERROR! conflicting action statements
>
> The error appears to have been in 
> '/usr/share/ansible/NXS-TEMPLATE/roles/tor/tasks/main.yml': line 2, column 
> 5, but may
> be elsewhere in the file depending on the exact syntax problem.
>
> The offending line appears to be:
>
> ---
>   - name: Generate tor files
>     ^ here
>
>
> The error appears to have been in 
> '/usr/share/ansible/NXS-TEMPLATE/roles/tor/tasks/main.yml': line 2, column 
> 5, but may
> be elsewhere in the file depending on the exact syntax problem.
>
> The offending line appears to be:
>
> ---
>   - name: Generate tor files
>     ^ here
>
>
> The file main.yml has the following contents:
>
> ---
>   - name: Generate tor files
>     template: src=tor.j2 dest="{{ item.hostname }}.txt"
>     with_items:
>      - hostname: nexus1
>      - hostname: nexus2
> ...
>
> Thanks
> GP
>
>
>

-- 
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/66c58ef6-7bbd-4a79-b194-5a93cd41444d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to