What am I missing?

188 views
Skip to first unread message

Steven Williams

unread,
Nov 7, 2019, 6:48:59 PM11/7/19
to Ansible Project
Getting Error:

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: false

  connection: network_cli

  become_method: enable

  become: yes


  vars:

          ansible_user: AnsibleReadOnlyUser

          ansible_ssh_pass: 12345

          ansible_become_pass: 12345

          ansible_network_os: asa

          ansible_become: yes

  tasks:

          - name: Set terminal page to zero

            asa_config:

                    lines:

                          - terminal pager 0




          - 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



Vladimir Botka

unread,
Nov 8, 2019, 3:11:10 AM11/8/19
to Steven Williams, ansible...@googlegroups.com
On Thu, 7 Nov 2019 15:48:59 -0800 (PST)
Steven Williams <stevenjw...@gmail.com> wrote:

> fatal: [10.53.0.105]: FAILED! => changed=false
> [...]
> msg: operation requires privilege escalation
>
> *tasks*:
> - *name*: Set terminal page to zero
> *asa_config*:
> *lines*:
> - terminal pager 0

FWIW. See "ios_config traceback on some devices #40884"
https://github.com/ansible/ansible/issues/40884
(locked and limited conversation to collaborators on Jul 22)

"... Operation requires privilege escalation on a device whose user account
was level 15 already). Running ios_facts and supplying the running_config to
the ios_config task worked fine, but the weird thing is I'm on ansible
2.8.2? ..."

Cheers,

-vlado

Steven Williams

unread,
Nov 8, 2019, 7:41:01 AM11/8/19
to Ansible Project
This isn't ios_config though. When i log into the device with the username and password in the ansible script it works fine and the command takes. So why is it failing?
Reply all
Reply to author
Forward
0 new messages