main.yml 776 B

12345678910111213141516171819202122232425262728293031
  1. ---
  2. - name: Ensure all the relevant projects are enabled for monitoring
  3. k8s:
  4. kubeconfig: tmp/kubeconfig-ocp4
  5. validate_certs: no
  6. api_version: v1
  7. kind: namespace
  8. name: "{{ item }}"
  9. definition:
  10. metadata:
  11. labels:
  12. openshift.io/cluster-monitoring: "true"
  13. loop:
  14. - openshift-operators-redhat
  15. - openshift-operators
  16. - openshift-logging
  17. - name: Create a LokiStack resource if not yet there
  18. k8s:
  19. kubeconfig: tmp/kubeconfig-ocp4
  20. validate_certs: no
  21. api_version: loki.grafana.com/v1
  22. kind: lokistack
  23. name: logging-loki
  24. namespace: openshift-logging
  25. definition: "{{ lookup('ansible.builtin.file', 'files/loki-stack.yml') }}"
  26. # Create a ClusterLogging instance if not yet there.
  27. # Verification???