浏览代码

Update inventory_creation.yml

Signed-off-by: Shubhangi-dell <shubhangi_srivastava@dell.com>
Shubhangi-dell 3 年之前
父节点
当前提交
34c57f68c2
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      control_plane/roles/control_plane_device/files/inventory_creation.yml

+ 9 - 0
control_plane/roles/control_plane_device/files/inventory_creation.yml

@@ -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"