---

- name: Deploy metering resources
  include_tasks: deploy_resources.yml
  vars:
    values_file: /tmp/metering-values.yaml
    resources:
      - template_file: templates/metering/metering-roles.yaml
        apis: [ {kind: role, api_version: 'rbac.authorization.k8s.io/v1'} ]
        prune_label_value: openshift-metering-roles
      - template_file: templates/metering/metering-rolebindings.yaml
        apis: [ {kind: rolebindings, api_version: 'rbac.authorization.k8s.io/v1'} ]
        prune_label_value: openshift-metering-rolebindings
      - template_file: templates/metering/metering-root-ca-secret.yaml
        apis: [ {kind: Secret} ]
        prune_label_value: openshift-metering-root-ca-secret
        create: "{{ meteringconfig_create_metering_root_ca_secret }}"
