Explorar o código

Update global_config.yml

Signed-off-by: abhishek-sa1 <abhishek.sa3@dell.com>
abhishek-sa1 %!s(int64=3) %!d(string=hai) anos
pai
achega
455cbbe6dc
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      control_plane/roles/network_ib/tasks/global_config.yml

+ 4 - 2
control_plane/roles/network_ib/tasks/global_config.yml

@@ -1,4 +1,4 @@
-# Copyright 2021 Dell Inc. or its subsidiaries. All Rights Reserved.
+# Copyright 2022 Dell Inc. or its subsidiaries. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -32,4 +32,6 @@
 - name: Status check for - "{{ inventory_hostname }}" - "{{ item }}"
   fail:
     msg: "{{ global_conf.json }}"
-  when: global_conf.json.status != "OK"
+  when: 
+    - ( global_conf.json.status is defined and global_conf.json.status != "OK" ) or 
+      ( global_conf.json.results is defined and global_conf.json.results[0].status != "OK" )