I've added a comment with the the corrected playbook sample

https://gist.github.com/privateip/11b042e569585ee9248a

Regards,
John Barker

On Wednesday, 10 August 2016 15:32:23 UTC+1, Bharath Bharadwaj wrote:
>
> Hi All,
>
> I'm new to Ansible and yml, my goal is to automate a part of network 
> operation, I just want to start with a very simple output, copied below is 
> my playbook, I'm trying to run a show version, but i'm getting error when 
> executing the output, yet when i try the same yml script through yml 
> validator, there is no errors.
>
> My Playbook
>
> vars:
>     cli:
>     host: "{{ network }}"
>     username: admin
>     password: test@123
>     transport: cli
>
> tasks:
> - name: run multiple commands on remote nodes
>   ios_command:
>   - commands: show version
>   - provider: "{{ cli }}"
>   - transport: cli
>
> Error:
> "ERROR! playbooks must be a list of plays
>
> The error appears to have been in '/etc/ansible/playbooks/cisco_ios.yml': 
> line 1, column 1, but may
> be elsewhere in the file depending on the exact syntax problem.
>
> The offending line appears to be:
>
>
> vars:
> ^ here"
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ee947c1c-adce-49aa-a57b-8d43f70e070b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to