79183976

Date: 2024-11-13 08:28:35
Score: 0.5
Natty:
Report link

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
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): is a
  • Low reputation (0.5):
Posted by: ha36d