Jelajahi Sumber

Dont fail when datasource or dashboard already exists

Mateus Caruccio 6 tahun lalu
induk
melakukan
c5bd0cb421
1 mengubah file dengan 9 tambahan dan 0 penghapusan
  1. 9 0
      roles/openshift_grafana/tasks/install_grafana.yaml

+ 9 - 0
roles/openshift_grafana/tasks/install_grafana.yaml

@@ -175,6 +175,9 @@
     method: POST
     body: '{{ payload_data }}'
     body_format: json
+    status_code:
+    - 200
+    - 409
     headers:
       Content-Type: "Content-Type: application/json"
   register: add_ds
@@ -221,6 +224,9 @@
     method: POST
     body: '{{ slurpfile["content"] | b64decode }}'
     body_format: json
+    status_code:
+    - 200
+    - 412
     headers:
       Content-Type: "Content-Type: application/json"
   register: add_ds
@@ -238,6 +244,9 @@
     method: POST
     body: '{{ slurpfile["content"] | b64decode }}'
     body_format: json
+    status_code:
+    - 200
+    - 412
     headers:
       Content-Type: "Content-Type: application/json"
   register: add_ds