I seem to be having some issues making this playbook work. I want to just
do a show run on all my cisco devices, but it keeps throwing errors about
the '- vars:' or something else. I am on the latest version.
rpm -qa|grep -i ansible
ansible-inventory-grapher-2.3.2-1.el7.noarch
ansible-2.3.1.0-1.el7.noarch
ansible-review-0.13.0-2.el7.noarch
ansible-openstack-modules-0-20140902git79d751a.el7.noarch
ansible-lint-3.4.12-1.el7.noarch
ansible-doc-2.3.1.0-1.el7.noarch
- vars:
hosts: cisco-fw
cli:
hosts: "{{ cisco-fw }}"
username: user
password: password
authorize: yes
auth_pass: password
transport: cli
tasks:
- asa_command:
commands:
- show version
provider: "{{ cli }}"
- asa_command:
commands:
- show run
- show memory
provider: "{{ cli }}"
- asa_command:
commands:
- show version
provider: "{{ cli }}"
context: system
Here is my output:
sudo ansible-playbook asa-showrun.yml --check
ERROR! Syntax Error while loading YAML.
The error appears to have been in
'/home/andrew.meyer/playbooks/asa-showrun.yml': line 3, column 8, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
hosts: cisco-fw
cli:
^ 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 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/cbf43107-7189-4745-b127-0a08bcb7f634%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.