I need help to run write ansible playbook to run show commands on Cisco
Starent devices
And I'm running into some errors
Playbook
---
- name: Run Show Command
hosts: all
connection: network_cli
gather_facts: no
tasks:
- name: Gather Fact on all hosts
ios_facts:
- name: Run show Command
ios_commands:
- commands: "show alarm outstanding"
---
Errror
ansible@denchpw26:~$ sudo nano CiscoCheck_playbook.ymlCSR, -u a
ansible@denchpw26:~$ clear
ansible@denchpw26:~$ ansible-playbook -i all, -u ansible -k -e
ansible_network_os=ios CiscoCheck_playbook.yml
SSH password:
[WARNING]: Found both group and host with same name: all
ERROR! Syntax Error while loading YAML.
mapping values are not allowed in this context
The error appears to have been in '/home/ansible/CiscoCheck_playbook.yml':
line 3, column 8, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: Run Show Command
^ 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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/2088e1ee-d765-4934-806d-97e664b33ce2%40googlegroups.com.