# I'm having an issue with the cisco.ios\_command module when used to accesss an AP and become enable

**URL:** <https://forum.ansible.com/t/im-having-an-issue-with-the-cisco-ios-command-module-when-used-to-accesss-an-ap-and-become-enable/43254>\
**Category:** Get Help\
**Created:** [June 9, 2025, 11:00pm UTC](https://forum.ansible.com/t/im-having-an-issue-with-the-cisco-ios-command-module-when-used-to-accesss-an-ap-and-become-enable/43254 "2025-06-09T23:00:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Hockett](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/matt_hockett/32/8749_2.png) [@Matt\_Hockett](https://forum.ansible.com/u/Matt_Hockett)\
**Post date:** [June 9, 2025, 11:00pm UTC](https://forum.ansible.com/t/im-having-an-issue-with-the-cisco-ios-command-module-when-used-to-accesss-an-ap-and-become-enable/43254/1 "2025-06-09T23:00:20Z")

</div>

- I’m having an issue with the cisco.ios\_command module when used to access an AP and become enable. I get the following error:  
“msg”: “failed to elevate privilege to enable mode, at prompt [b’\rAP-APB-FL1-AP14#'] with error: unable to fetch privilege, with error: show privilege\r\n ^\r\n% Invalid input detected at ‘^’ marker.\r\n\rAP-APB-FL1-AP14#”

As you can see by the prompt it did correctly become enable, but the AP does not have the command show privilege available so it errors out. I’m trying to find a way to bypass that one check so I can run this playbook against multiple AP’s that need a reboot. I can ssh from CLI direct to the AP by dns name, login, and elevate with enable using the passwords in the file.

- Code below

````auto

---
-
  name: "Current AP Image"
  hosts: all
  gather_facts: no
  vars:
    date: "{{ lookup('pipe', 'date +%Y%m%d') }}"
  tasks:

  - name: testing commands to AP
    cisco.ios.ios_command:
      commands:
      - command: "reload"
         prompt: "Proceed with reload? [confirm]"
         answer: "\r"
    ignore_errors: yes

```end

```hosts

## Ansible Hosts File

all:
WLC1_APS:
  vars:
    ansible_connection: network_cli
    ansible_network_os: cisco.ios.ios
    ansible_user: admin
    ansible_become: yes
    ansible_become_method: enable
    ansible_password: (removed)
    ansible_become_password: (removed)

    ansible_command_timeout: 1200
    ansible_check_mode: no
    ansible_ignore_errors: true

  hosts:
    NAME_OF_AP_GOES_HERE

```end

```ansible.cfg

#Ansible local config file
[defaults]
inventory = ./hosts
#Use local hosts file in folder
host_key_checking = False
#Don't worry about RSA Fingerprints
retry_files_enabled = False
#Don't create .retry files on job failure
forks = 4
#The number of devices to try to connect to at once
ansible_comamnd_timeout = 600
#Delay for command to complete
authorize = yes
ignore_errors = True

```end

:

#cisco #ios #become #wireless
````
