浏览代码

Fix grafana role node selector check

Use the matching selector task instead of the recently removed
lib_utils_oo_has_no_matching_selector filter to verify node availability.
Pep Turró Mauri 7 年之前
父节点
当前提交
2bda9b0566
共有 1 个文件被更改,包括 6 次插入5 次删除
  1. 6 5
      roles/openshift_grafana/tasks/install_grafana.yaml

+ 6 - 5
roles/openshift_grafana/tasks/install_grafana.yaml

@@ -1,11 +1,12 @@
 ---
 
 - name: Ensure that Grafana has nodes to run on
-  fail:
-    msg: |-
-      No schedulable nodes found matching node selector for Grafana - '{{ grafana_node_selector }}'
-  when:
-  - openshift_schedulable_node_labels  | lib_utils_oo_has_no_matching_selector(grafana_node_selector)
+  import_role:
+    name: openshift_master
+    tasks_from: ensure_nodes_matching_selector.yml
+  vars:
+    openshift_master_ensure_nodes_selector: "{{ grafana_node_selector | map_to_pairs }}"
+    openshift_master_ensure_nodes_service: Grafana
 
 - name: Create grafana namespace
   oc_project: