1--- 2- name: run invalid command 3 register: result 4 ignore_errors: true 5 sonic_command: 6 commands: 7 - show foo 8 9- assert: 10 that: 11 - result.failed == true 12 - result.msg is defined 13 14- name: run commands that include invalid command 15 register: result 16 ignore_errors: true 17 sonic_command: 18 commands: 19 - show system 20 - show foo 21 22- assert: 23 that: 24 - result.failed == true 25 - result.msg is defined 26