1- name: Test sonic config with prompt handling
2  sonic_config:
3      commands:
4        - command: 'do image remove all'
5          prompt: '\[y/N\]:$'
6          answer: 'N'
7  register: prompt_tc
8
9- set_fact:
10    ansible_facts:
11      test_reports: "{{ ansible_facts['test_reports']| default({})| combine({module_name: {'prompt_test_case.1': prompt_tc_condition }}, recursive=True) }}"
12  no_log: true
13