Signed-off-by: Shubhangi-dell <shubhangi_srivastava@dell.com>
@@ -43,6 +43,7 @@
- name: Temp result
shell: cat /root/omnia/control_plane/roles/collect_device_info/files/mgmt_provisioned_hosts.yml |sort|uniq
+ changed_when: false
register: inventory
- name: Final Inventory
@@ -51,3 +52,11 @@
- name: New line at end of file
shell: echo "">> omnia/control_plane/roles/collect_device_info/files/mgmt_provisioned_hosts.yml
changed_when: false
+
+ - name: Delete files
+ file:
+ path: "{{ item }}"
+ state: absent
+ with_items:
+ - "/root/temp.txt"
+ - "/root/dynamic_hosts.yml"