implement checks on every iteration using with_items

Hi All,

I have the following code:

  • name: execute all commands in the file
    cisco.asa.aa_command:
    commands:
  • “{{ item }}”
    with_lines: cat ./role1/files/commands.txt
    register: output

Now I want to implement a check on every iteration, to check if a command is failed or not