aaa accounting identity
is a command in config terminal
mode and cisco.ios.ios_command
module does not support running commands in configuration mode. Therefore you should use ios_config to configure IOS devices.
But handling interactive prompts like "Do you wish to continue? [yes]:" can be tricky with modules like ios_config
since it doesn’t have a builtin way to respond to such prompts. For this scenario, cli_command can be used.
- name: Run commands that require answering a prompt
ansible.netcommon.cli_command:
command: "{{ item }}"
prompt:
- Do you wish to continue
answer: y
loop:
- configure
- aaa accounting identity default start-stop group ISE-RADIUS-SERVERS
- exit