implement checks on every iteration using with_items

9 views
Skip to first unread message

Som Das

unread,
Jul 28, 2021, 12:51:10 AM7/28/21
to Ansible Development
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
Reply all
Reply to author
Forward
0 new messages