1- name: create configurable backup path
2  sonic_config:
3    backup: yes
4    backup_options:
5      filename: backup.cfg
6      dir_path: /home/
7  register: backup_file
8
9- name: Verify file is created or not
10  stat: path={{backup_file.backup_path}}
11  register: backup_tc
12
13- set_fact:
14    ansible_facts:
15      test_reports: "{{ ansible_facts['test_reports']| default({})| combine({module_name: {'backup_test_case.1': backup_condition }}, recursive=True) }}"
16  no_log: true
17