Privelege escalation using cisco ioscommand module


I’ve been having issues with cisco modules. I keep getting a privelege escalation error when I run my playbooks against some of my inventory in my home lab which I found odd since it started once I updated my ansible version.

I’ll attach some screnshots.

I believe I may have found fix but I’m not sure and even worse I don’t know how to apply it.

Found this on Github

Hello @johntxjw,

To assist you more effectively, could you please provide further details about your environment? Specifically, sharing the playbook’s task, especially the one labeled as “reload devices,” would be immensely helpful. Additionally, obtaining the playbook’s verbose output (using -vvv) and specifying the version of ansible-core you’re currently running would greatly aid in troubleshooting.

As a suggestion, you might consider updating the cisco.ios collection—assuming that’s the one in use—by executing the following command:

ansible-galaxy collection install cisco.ios --force

Also, make sure you’re using the full FQCN on your task, not just the module’s name, like in this example:

- name: Backup current switch config (ios)
    backup: yes
  register: backup_ios_location
  when: ansible_network_os == 'cisco.ios.ios'

Furthermore, I recommend reviewing all the relevant information available on these documentation pages to ensure no crucial steps are overlooked:

Hope it helps!

EDIT: I forgot to ask, What ios version you got on the managed nodes that are failing to authenticate?

1 Like