02-08-2023 11:12 PM
I am trying to change Cisco controller password with ansible cisco.ios.ios_user module. My playbook as below:
03-07-2023 11:25 AM
Hi @palashbarua,
Can you please try running the playbook in verbose mode "-vvvv" and paste the result here?
03-09-2023 05:13 AM
The issue here is that your task is trying to run the commands in enable mode but it is unable to elevate privileges to do so. Something like.... might work.
- name: Playbook to change admin user password for CIMC
hosts: cimcserver
gather_facts: no
become: yes
become_method: enable
vars:
ansible_become_pass: <enable_password>
tasks:
- name: CIMC new user details
cisco.ios.ios_user:
name: admin
configured_password: <new_password>
update_password: always
state: present
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide