To help get the indentation right, I rely on Visual Studio Code with the yaml extension https://marketplace.visualstudio.com/items?itemName=djabraham.vscode-yaml-validation
On Friday, June 17, 2016 at 7:04:33 AM UTC+2, [email protected] wrote: > > 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/80958f13-15c5-4c0d-923b-2518c5c15962%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
