cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1912
Views
0
Helpful
0
Replies

Ansible Error when running yml for ASA

Steven Williams
Level 4
Level 4

Keep getting an error when trying to configure a line on ASA:

 

root@bnaplxjmpnet:/etc/ansible# ansible-playbook asa03.yml

 

PLAY [show Anyconnect VPN connections for ASA] *********************************************************************

 

TASK [Set terminal page to zero] ***********************************************************************************

fatal: [10.53.0.105]: FAILED! => changed=false

  ansible_facts:

    discovered_interpreter_python: /usr/bin/python

  msg: operation requires privilege escalation

 

PLAY RECAP *********************************************************************************************************

10.53.0.105                : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

 

---

 

- name: show Anyconnect VPN connections for ASA

  hosts: CAO_ASA

  gather_facts: no

  connection: network_cli

  become_method: enable

  become: yes

 

 

  vars:

          ansible_connection: network_cli

          ansible_user: AnsibleReadOnlyUser

          ansible_ssh_pass: 12345

          ansible_become_pass: 12345

          ansible_network_os: asa

          ansible_become: yes

          ansible_become_method: enable

  tasks:

          - name: Set terminal page to zero

            asa_config:

                    lines:

                          - terminal pager 0

                    match: line

                    authorize: yes

                    username: AnsibleReadOnlyUser

                    password: 12345

 

 

 

          - name: Show version

            asa_command:

                   commands:

                           - show vpn-sessiondb anyconnect

 

 

            register: print_output

 

 

       # - debug: var=print_output.stdout_lines

 

          - name: copy output to file

            copy: content="{{print_output.stdout[0]}}" dest=./test-asa-results.txt

 

 

0 Replies 0