Hi,
I am relatively new to Ansible and exploring the feature as best as I can. I am trying to build the Nexus 9000 series switch config based off the following website:
https://pynet.twb-tech.com/blog/ansible/ansible-cfg-template.htmlWhenever, I am trying to execute the site.yml file, I see the following error:
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 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 contents of the main.yml file is below:
---
- name: Generate tor files
template: src=tor.j2 dest="{{ item.hostname }}.txt"
with_items:
- hostname: nexus1
- hostname: nexus2
...
++++++++++++++++++++++++++++++++++++
The contents of the site.yml is :
ore site.yml
---
- name: Generate switch configuration files
hosts: localhost
roles:
Appreciate if anyone can help me here.
Thanks,
GP
- tor