getting error when trying to use asa_command playbook

16 views
Skip to first unread message

Andrew Meyer

unread,
Apr 3, 2017, 10:27:27 AM4/3/17
to Ansible Project
When I run my playbook i'm getting the following:

 ansible-playbook asa-config1-test.yml
ERROR! Syntax Error while loading YAML.


The error appears to have been in '/home/andrew.meyer/playbooks/asa-config1-test.yml': line 11, column 16, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

 name: test
  - asa_command:
               ^ here


cat asa-config1-test.yml
 vars:
   cli:
     host: 10.150.1.1
     username: "{{ username }}"
     password: "{{ password }}"
     authorize: yes
     auth_pass: "{{ password }}"
     transport: cli

 name: test
  - asa_command:
      commands:
        - show version
        - show run
        - show memory
      provider: "{{ connections.ssh }}"
      context: system


Not sure why it is failing....

Kai Stian Olstad

unread,
Apr 3, 2017, 1:43:35 PM4/3/17
to ansible...@googlegroups.com
This is not a correct playbook file, I suggest reading this
https://docs.ansible.com/ansible/playbooks_intro.html

And you task should be

- name: test
asa_command:

--
Kai Stian Olstad
Reply all
Reply to author
Forward
0 new messages