I'm trying to use ansible to remove some old users on Cisco IOS switches and routers. The ansible task is currently failing due to the fact that IOS prompts the user on the CLI to confirm if they want to remove the username. Any way around this with ansible?
Here is a CLI example
SW01(config)#no username admin
This operation will remove all username related configurations with same name.Do you want to continue? [confirm]
ansible task
tasks:
- name: Remove username
ios_command:
commands: no username admin